Panda3D
|
This defines how a single column is interleaved within a vertex array stored within a Geom. More...
Public Types | |
enum | AnimationType { ATNone = 0, ATPanda = 1, ATHardware = 2 } |
enum | Contents { COther = 0, CPoint = 1, CClipPoint = 2, CVector = 3, CTexcoord = 4, CColor = 5, CIndex = 6, CMorphDelta = 7 } |
enum | GeomRendering { GRIndexedPoint = 1, GRIndexedOther = 65536, GRIndexedBits = 65537, GRPoint = 2, GRPointUniformSize = 4, GRPerPointSize = 8, GRPointPerspective = 16, GRPointAspectRatio = 32, GRPointScale = 64, GRPointRotate = 128, GRPointSprite = 256, GRPointSpriteTexMatrix = 512, GRPointBits = 1022, GRTriangleStrip = 1024, GRTriangleFan = 2048, GRLineStrip = 4096, GRCompositeBits = 7168, GRFlatFirstVertex = 8192, GRFlatLastVertex = 16384, GRShadeModelBits = 24576, GRTexcoordLightVector = 32768 } |
enum | NumericType { NTUint8 = 0, NTUint16 = 1, NTUint32 = 2, NTPackedDcba = 3, NTPackedDabc = 4, NTFloat32 = 5 } |
enum | PrimitiveType { PTNone = 0, PTPolygons = 1, PTLines = 2, PTPoints = 3 } |
enum | ShadeModel { SMUniform = 0, SMSmooth = 1, SMFlatFirstVertex = 2, SMFlatLastVertex = 3 } |
enum | UsageHint { UHClient = 0, UHStream = 1, UHDynamic = 2, UHStatic = 3, UHUnspecified = 4 } |
Public Member Functions | |
GeomVertexColumn (GeomVertexColumn const copy) | |
GeomVertexColumn (InternalName name, int num_components, NumericType numeric_type, Contents contents, int start) | |
int | getComponentBytes () |
Returns the number of bytes used by each component (that is, by one element of the numeric type). | |
Contents | getContents () |
Returns the token representing the semantic meaning of the stored value. | |
InternalName | getName () |
Returns the name of this particular data field, e.g. | |
int | getNumComponents () |
Returns the number of components of the column: the number of instances of the NumericType in each element. | |
NumericType | getNumericType () |
Returns the token representing the numeric type of the data storage. | |
int | getNumValues () |
Returns the number of numeric values of the column: the number of distinct numeric values that go into each element. | |
int | getStart () |
Returns the byte within the array record at which this column starts. | |
int | getTotalBytes () |
Returns the number of bytes used by each element of the column: component_bytes * num_components. | |
bool | hasHomogeneousCoord () |
Returns true if this Contents type is one that includes a homogeneous coordinate in the fourth component, or false otherwise. | |
bool | isBytewiseEquivalent (GeomVertexColumn const other) |
Returns true if the data store of this column is exactly the same as that of the other, irrespective of name or start position within the record. | |
GeomVertexColumn | operator= (GeomVertexColumn const copy) |
output (ostream out) | |
bool | overlapsWith (int start_byte, int num_bytes) |
Returns true if this column overlaps with any of the bytes in the indicated range, false if it does not. |
This defines how a single column is interleaved within a vertex array stored within a Geom.
The GeomVertexArrayFormat class maintains a list of these to completely define a particular array structure.
enum AnimationType [inherited] |
enum Contents [inherited] |
enum GeomRendering [inherited] |
enum NumericType [inherited] |
enum PrimitiveType [inherited] |
enum ShadeModel [inherited] |
enum UsageHint [inherited] |
GeomVertexColumn | ( | GeomVertexColumn const | copy | ) |
GeomVertexColumn | ( | InternalName | name, |
int | num_components, | ||
NumericType | numeric_type, | ||
Contents | contents, | ||
int | start | ||
) |
int getComponentBytes | ( | ) |
Returns the number of bytes used by each component (that is, by one element of the numeric type).
Contents getContents | ( | ) |
Returns the token representing the semantic meaning of the stored value.
InternalName getName | ( | ) |
Returns the name of this particular data field, e.g.
"vertex" or "normal". The name may be a user-defined string, or it may be one of the standard system-defined field types. Only the system-defined field types are used for the actual rendering.
int getNumComponents | ( | ) |
Returns the number of components of the column: the number of instances of the NumericType in each element.
This is usually, but not always, the same thing as get_num_values().
NumericType getNumericType | ( | ) |
Returns the token representing the numeric type of the data storage.
int getNumValues | ( | ) |
Returns the number of numeric values of the column: the number of distinct numeric values that go into each element.
This is usually, but not always, the same thing as get_num_components(); the difference is in the case of a composite numeric type like NT_packed_dcba, which has four numeric values per component.
int getStart | ( | ) |
Returns the byte within the array record at which this column starts.
This can be set to non-zero to implement interleaved arrays.
int getTotalBytes | ( | ) |
Returns the number of bytes used by each element of the column: component_bytes * num_components.
bool hasHomogeneousCoord | ( | ) |
Returns true if this Contents type is one that includes a homogeneous coordinate in the fourth component, or false otherwise.
If this is true, correct operation on the vertex data may require scaling by the homogeneous coordinate from time to time (but in general this is handled automatically if you use the 3-component or smaller forms of get_data() and set_data()).
bool isBytewiseEquivalent | ( | GeomVertexColumn const | other | ) |
Returns true if the data store of this column is exactly the same as that of the other, irrespective of name or start position within the record.
GeomVertexColumn operator= | ( | GeomVertexColumn const | copy | ) |
output | ( | ostream | out | ) |