NodeMesh: Difference between revisions
From Crumbled World Wiki
| Line 167: | Line 167: | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setPositions()|setPositions]]() | |[[NodeMesh:setPositions(Object)|setPositions]](Object) | ||
|Set the full position vertex Array on once call support [[Vec3]] or [[Vec4]] | |Set the full position vertex Array on once call support [[Vec3]] or [[Vec4]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setPositionsVec3( | |[[NodeMesh:setPositionsVec3(Object)|setPositionsVec3]](Object) | ||
|Set the full position vertex Array on once call, takes [[Vec3]] faster then the general setPositions function | |Set the full position vertex Array on once call, takes [[Vec3]] faster then the general setPositions function | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setPositionsVec4( | |[[NodeMesh:setPositionsVec4(Object)|setPositionsVec4]](Object) | ||
|Set the full position vertex Array on once call, takes [[Vec4]] faster then the general setPositions function | |Set the full position vertex Array on once call, takes [[Vec4]] faster then the general setPositions function | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setNormals( | |[[NodeMesh:setNormals(Object)|setNormals]](Object) | ||
|Set the full normal vertex Array in one call, takes [[Vec3]] | |Set the full normal vertex Array in one call, takes [[Vec3]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setUvCoords( | |[[NodeMesh:setUvCoords(Object)|setUvCoords]](Object) | ||
|Set the full uvCoords vertex Array in one call, takes [[Vec2]] | |Set the full uvCoords vertex Array in one call, takes [[Vec2]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setColors( | |[[NodeMesh:setColors(Object)|setColors]](Object) | ||
|Set the full Color vertex Array in one call, takes [[Vec3]] or optionally [[Vec4]] | |Set the full Color vertex Array in one call, takes [[Vec3]] or optionally [[Vec4]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setTangents( | |[[NodeMesh:setTangents(Object)|setTangents]](Object) | ||
|Set the full Tagent vertex Array in one call, takes [[Vec3]] | |Set the full Tagent vertex Array in one call, takes [[Vec3]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setIndices( | |[[NodeMesh:setIndices(Object)|setIndices]](Object) | ||
|Set the all indices Array in one call, takes [[number]] | |Set the all indices Array in one call, takes [[number]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setBoneWeights( | |[[NodeMesh:setBoneWeights(Object)|setBoneWeights]](Object) | ||
|Set the all Bone weights Array in one call, takes [[Vec3()]] | |Set the all Bone weights Array in one call, takes [[Vec3()]] | ||
|- | |- | ||
| | | | ||
|[[NodeMesh:setBoneIds( | |[[NodeMesh:setBoneIds(Object)|setBoneIds]](Object) | ||
|Set the all Bone ID's Array in one call, takes [[number]] | |Set the all Bone ID's Array in one call, takes [[number]] | ||
|- | |- | ||
Latest revision as of 13:54, 1 August 2025
Inheritance
Static functions
| return | function | description |
|---|---|---|
| NodeMesh | new() | Create a new Instance of the the NodeMesh |
| NodeMesh | new(RenderMode renderMode) | Create a new Instance of the the NodeMesh |
Functions
| return | function | description |
|---|---|---|
| clearMesh() | ||
| setVertexType(VertexType in1) | ||
| setVertexType(VertexType in1, VertexType in2) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3, VertexType in4) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3, VertexType in4, VertexType in5) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3, VertexType in4, VertexType in5, VertexType in6) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3, VertexType in4, VertexType in5, VertexType in6, VertexType in7) | ||
| setVertexType(VertexType in1, VertexType in2, VertexType in3, VertexType in4, VertexType in5, VertexType in6, VertexType in7, VertexType in8) | ||
| bindVertexToShaderName(string name1) | ||
| bindVertexToShaderName(string name1, string name2) | ||
| bindVertexToShaderName(string name1, string name2, string name3) | ||
| bindVertexToShaderName(string name1, string name2, string name3, string name4) | ||
| bindVertexToShaderName(string name1, string name2, string name3, string name4, string name5) | ||
| bindVertexToShaderName(string name1, string name2, string name3, string name4, string name5, string name6) | ||
| bindVertexToShaderName(string name1, string name2, string name3, string name4, string name5, string name6, string name7) | ||
| bindVertexToShaderName(string name1, string name2, string name3, string name4, string name5, string name6, string name7, string name8) | ||
| Vec4 | getVertex(int index) | |
| Vec4 | getNormal(int index) | |
| Vec2 | getUvCoord(int index) | |
| Vec4 | getColor(int index) | |
| Vec4 | getTangent(int index) | |
| int | getIndex(int index) | |
| int | getNumVertex() | |
| int | getNumNormal() | |
| int | getNumUvCoord() | |
| int | getNumColor() | |
| int | getNumTangents() | |
| int | getNumIndex() | |
| removeVertex() | ||
| removeNormal() | ||
| removeUvCoord() | ||
| removeColor() | ||
| removeTangent() | ||
| removeIndex() | ||
| setPositions(Object) | Set the full position vertex Array on once call support Vec3 or Vec4 | |
| setPositionsVec3(Object) | Set the full position vertex Array on once call, takes Vec3 faster then the general setPositions function | |
| setPositionsVec4(Object) | Set the full position vertex Array on once call, takes Vec4 faster then the general setPositions function | |
| setNormals(Object) | Set the full normal vertex Array in one call, takes Vec3 | |
| setUvCoords(Object) | Set the full uvCoords vertex Array in one call, takes Vec2 | |
| setColors(Object) | Set the full Color vertex Array in one call, takes Vec3 or optionally Vec4 | |
| setTangents(Object) | Set the full Tagent vertex Array in one call, takes Vec3 | |
| setIndices(Object) | Set the all indices Array in one call, takes number | |
| setBoneWeights(Object) | Set the all Bone weights Array in one call, takes Vec3() | |
| setBoneIds(Object) | Set the all Bone ID's Array in one call, takes number | |
| setVertex(int index, Vec4 vertex) | ||
| setNormal(int index, Vec4 normal) | ||
| setUvCoord(int index, Vec2 uvCoord) | ||
| setColor(int index, Vec4 color) | ||
| setTangent(int index, Vec4 tangent) | ||
| setIndex(int index, int index) | ||
| addVertex(Object in1) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2,) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3, Object in4) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3, Object in4, Object in5) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3, Object in4, Object in5, Object in6) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3, Object in4, Object in5, Object in6, Object in7) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addVertex(Object in1, Object in2, Object in3, Object in4, Object in5, Object in6, Object in7, Object in8) | When the setVertexType has been set this function can be used to add an entire vertex at once. | |
| addPosition(Vec3 vertex) | ||
| addPosition(Vec4 vertex) | ||
| addNormal(Vec3 normal) | ||
| addNormal(Vec4 normal) | ||
| addUvCoord(Vec2 uvCoord) | ||
| addColor(Vec3 color) | ||
| addColor(Vec4 color) | ||
| addTangent(Vec3 tangent) | ||
| addTangent(Vec4 tangent) | ||
| addIndex(int index) | ||
| addTriangleIndex(int index1, int index2, int index3) | ||
| bool | addMesh(Mesh mesh) | This will make a copy of the mesh in the original position of the mesh.
Returns true when a copy was made else return false. |
| compile() |