Array of vertices with interlaced position, normal, texCoord, and tangent attributes.
More...
|
| CPUVertexArray () |
|
| CPUVertexArray (const CPUVertexArray &otherArray) |
|
void | clear () |
|
void | copyFrom (const CPUVertexArray &other) |
|
void | copyTexCoord0ToTexCoord1 () |
|
void | copyToGPU (AttributeArray &vertex, AttributeArray &normal, AttributeArray &packedTangent, AttributeArray &texCoord0, AttributeArray &texCoord1, AttributeArray &vertexColors, VertexBuffer::UsageHint hint=VertexBuffer::WRITE_ONCE) const |
|
void | copyToGPU (AttributeArray &vertex, AttributeArray &normal, AttributeArray &packedTangent, AttributeArray &texCoord0, AttributeArray &texCoord1, AttributeArray &vertexColors, AttributeArray &boneIndices, AttributeArray &boneWeights, VertexBuffer::UsageHint hint=VertexBuffer::WRITE_ONCE) const |
|
bool | hasPrevPosition () const |
| True if prevPosition is nonempty. More...
|
|
bool | hasTexCoord (int coord) const |
|
void | offsetAndScaleTexCoord1 (const Point2 &offset, const Point2 &scale) |
|
int | size () const |
|
void | transformAndAppend (const CPUVertexArray &otherArray, const CoordinateFrame &cframe) |
|
void | transformAndAppend (const CPUVertexArray &otherArray, const CoordinateFrame &cframe, const CoordinateFrame &prevCFrame) |
| Transform otherArray.vertex.position by cframe and append to vertex.position. More...
|
|
Array of vertices with interlaced position, normal, texCoord, and tangent attributes.
- See also
- G3D::Surface, G3D::UniversalSurface::CPUGeom, G3D::MeshAlg, G3D::Triangle, G3D::TriTree
◆ CPUVertexArray() [1/2]
G3D::CPUVertexArray::CPUVertexArray |
( |
| ) |
|
|
inline |
◆ CPUVertexArray() [2/2]
G3D::CPUVertexArray::CPUVertexArray |
( |
const CPUVertexArray & |
otherArray | ) |
|
|
explicit |
◆ clear()
void G3D::CPUVertexArray::clear |
( |
| ) |
|
|
inline |
◆ copyFrom()
◆ copyTexCoord0ToTexCoord1()
void G3D::CPUVertexArray::copyTexCoord0ToTexCoord1 |
( |
| ) |
|
◆ copyToGPU() [1/2]
- Parameters
-
texCoord1 | This is not interleaved with the other data in GPU memory. |
vertexColors | This is not interleaved with the other data in GPU memory. |
◆ copyToGPU() [2/2]
- Parameters
-
texCoord1 | This is not interleaved with the other data in GPU memory. |
boneIndices,boneWeights | These are only interleaved with each other in GPU memory |
vertexColors | This is not interleaved with the other data in GPU memory. |
◆ hasPrevPosition()
bool G3D::CPUVertexArray::hasPrevPosition |
( |
| ) |
const |
|
inline |
True if prevPosition is nonempty.
It is ambiguous if an empty vertex array has a prevPosition array.
◆ hasTexCoord()
bool G3D::CPUVertexArray::hasTexCoord |
( |
int |
coord | ) |
const |
|
inline |
◆ offsetAndScaleTexCoord1()
void G3D::CPUVertexArray::offsetAndScaleTexCoord1 |
( |
const Point2 & |
offset, |
|
|
const Point2 & |
scale |
|
) |
| |
◆ size()
int G3D::CPUVertexArray::size |
( |
| ) |
const |
|
inline |
◆ transformAndAppend() [1/2]
◆ transformAndAppend() [2/2]
Transform otherArray.vertex.position by cframe and append to vertex.position.
Transform otherArray.vertex.position by prevCFrame and append to prevPosition. Assumes that otherArray does not contain a prevPosition array of its own.
◆ boneIndices
◆ boneWeights
4 floats indicating the weighting for the 4 bones that affect animation for the vertex
Referenced by clear().
◆ hasBones
bool G3D::CPUVertexArray::hasBones |
True if boneIndices and boneWeights contain valid data.
Referenced by clear().
◆ hasTangent
bool G3D::CPUVertexArray::hasTangent |
True if tangent contains valid data.
Referenced by clear().
◆ hasTexCoord0
bool G3D::CPUVertexArray::hasTexCoord0 |
◆ hasTexCoord1
bool G3D::CPUVertexArray::hasTexCoord1 |
◆ hasVertexColors
bool G3D::CPUVertexArray::hasVertexColors |
True if vertexColors contains valid data.
Referenced by clear().
◆ prevPosition
The position of the vertex in the previous frame, in the same coordinate system as vertex.position.
This is stored outside of the CPUVertexArray::vertex array because it is not used by most models.
Referenced by clear(), and hasPrevPosition().
◆ texCoord1
A second texture coordinate (which is not necessarily stored in texture coordinate attribute 1 on a GPU).
This must be on [0,1]. Typically used for light map coordinates.
This is stored outside of the CPUVertexArray::vertex array because it is not used by most models.
Referenced by clear().
◆ vertex
◆ vertexColors