fastest 3D software for linux

Linux 3D
interactive ray-tracing
[1 introduction] [2 overview] [3 reference] [4 GUI]

Index

 E3dVertexNodes_New
 E3dVertexNodeAttribute_Add
 E3dVertexNodeAttribute_Offset


E3dVertexNodes_New

Allocate VertexNodes

Syntax
E3dVertexNode* E3dVertexNodes_New(const int PNumOfVertexNodes, const E3dVertexNodeSize PVertexNodeSize)

Arguments
const int PNumOfVertexNodes The number of VertexNodes to allocate const E3dVertexNodeSize PVertexNodeSize The size of a VertexNode in bytes
Description
Allocates VertexNodes for the given Polygon. For performance reasons, the VertexNodes will not be initialized. It's up to the caller to do that.

Return value
A pointer to the allocated array of VertexNodes or NULL in case of an error

See also
E3dPolygon_AddVertexNode

E3dVertexNodeAttribute_Add

Add a Vertex attribute to a list

Syntax
int E3dVertexNodeAttribute_Add(EResourceList* PList, const char* PName, const char* PSemantic, const int PIndex, const EResource* PCustomAttr, EResource** PVARet)

Arguments
EResourceList* PList Pointer to the list const char* PName The name of the new attribute const char* PSemantic The semantic string of the new attribute const int PIndex Index of the new attribute. Only applies to texture coordinates const EResource* PCustomAttr If not NULL, it specifies a custom vertex attribute EResource** PVARet Pointer to return the new attribute
Description
Adds a vertex attribute, such as normals, or texture coordinates. The most common use is adding a vertex attribute to a PolyGroup. For example: E3dVertexNodeAttribute_Add(&LPolyGroup->VertexAttributes, E3dVtxAttribute_Normal, 0, NULL, NULL); By default, PolyGroups don't have vertex normals, to save memory on potentially large Meshes. All renderers will use the Polygon normals, in this case. To add normals, this function should be called like shown above, or you can simply use E3dPolyGroup_VertexAttributeAdd() If PCustomAttr is NULL, a built-in attribute is assumed, such as: - E3dVtxAttribute_Normal - E3dVtxAttribute_Color - E3dVtxAttribute_ST - E3dVtxAttribute_UV - E3dVtxAttribute_Tangent

Return value
E_SUCCESS if successful, E_NOTHING_TO_DO if the VertexAttribute already exists

See also
E3dPolyGroup_VertexAttributeAdd

E3dVertexNodeAttribute_Offset

Compute offset of a VertexNode attribute, specified by semantic and index

Syntax
E3dVertexNodeSize E3dVertexNodeAttribute_Offset(const EResourceList* PList, const char* PSemantic, const int PIndex)

Arguments
const EResourceList* PList VertexNodeAttribute list const char* PSemantic Semantic const int PIndex Attribute index (if there are multiple Attributes with the same Semantic, e.g. multiple ST sets)
Description
Returns the byte offset of the given VertexAttribute.

Return value
None.
© 1996-2022 By Gabor Nagy