Rev 786 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BauzoidNET
.graphics.model
{
public class AttributeArray
{
private float[] mAttributeArray
= null;
private int mCurrentIndex
= 0;
public AttributeArray
(int size
)
{
mAttributeArray
= new float[size
];
mCurrentIndex
= 0;
}
public void fill
(float x
)
{
mAttributeArray
[mCurrentIndex
] = x
; mCurrentIndex
++;
}
public void fill
(float x,
float y
)
{
mAttributeArray
[mCurrentIndex
] = x
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = y
; mCurrentIndex
++;
}
public void fill
(float x,
float y,
float z
)
{
mAttributeArray
[mCurrentIndex
] = x
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = y
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = z
; mCurrentIndex
++;
}
public void fill
(float x,
float y,
float z,
float w
)
{
mAttributeArray
[mCurrentIndex
] = x
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = y
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = z
; mCurrentIndex
++;
mAttributeArray
[mCurrentIndex
] = w
; mCurrentIndex
++;
}
public float[] getAttributeArray
()
{
return mAttributeArray
;
}
public int getUsedCount
()
{
return mCurrentIndex
;
}
}
}