NodeMesh: Difference between revisions

From Crumbled World Wiki
(Created page with "{{:NodeMeshExampleCode}} ==Inheritance== RenderNode ==Static functions== {| class="wikitable" !|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== {| class="wikitable" !|return !|function !|description |- | |clearMesh() | |-...")
 
Line 165: Line 165:
|[[NodeMesh:removeIndex()|removeIndex]]()
|[[NodeMesh:removeIndex()|removeIndex]]()
|
|
|-
|
|[[NodeMesh:setPositions({})|setPositions]]({})
|Set the full position vertex Array on once call support [[Vec3]] or [[Vec4]]
|-
|
|[[NodeMesh:setPositionsVec3({Vec3()})|setPositionsVec3]]({Vec3()})
|Set the full position vertex Array on once call, takes [[Vec3]] faster then the general setPositions function
|-
|
|[[NodeMesh:setPositionsVec4({Vec4()})|setPositionsVec4]]({Vec4()})
|Set the full position vertex Array on once call, takes [[Vec4]] faster then the general setPositions function
|-
|
|[[NodeMesh:setNormals({Vec3()})|setNormals]]({Vec3()})
|Set the full normal vertex Array in one call, takes [[Vec3]]
|-
|
|[[NodeMesh:setUvCoords({Vec2()})|setUvCoords]]({Vec2()})
|Set the full uvCoords vertex Array in one call, takes [[Vec2]]
|-
|
|[[NodeMesh:setColors({})|setColors]]({})
|Set the full Color vertex Array in one call, takes [[Vec3]] or optionally [[Vec4]]
|-
|
|[[NodeMesh:setTangents({Vec3()})|setTangents]]({Vec3()})
|Set the full Tagent vertex Array in one call, takes [[Vec3]]
|-
|
|[[NodeMesh:setIndices({number})|setIndices]]({number})
|Set the all indices Array in one call, takes [[number]]
|-
|
|[[NodeMesh:setBoneWeights({Vec3()})|setBoneWeights]]({Vec3()})
|Set the all Bone weights Array in one call, takes [[Vec3()]]
|-
|
|[[NodeMesh:setBoneIds({number})|setBoneIds]]({number})
|Set the all Bone ID's Array in one call, takes [[number]]
|-
|-
|
|

Revision as of 13:42, 1 August 2025

NodeMeshExampleCode

Inheritance

RenderNode

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()
[[NodeMesh:setPositions({})|setPositions]]({}) Set the full position vertex Array on once call support Vec3 or Vec4
[[NodeMesh:setPositionsVec3({Vec3()})|setPositionsVec3]]({Vec3()}) Set the full position vertex Array on once call, takes Vec3 faster then the general setPositions function
[[NodeMesh:setPositionsVec4({Vec4()})|setPositionsVec4]]({Vec4()}) Set the full position vertex Array on once call, takes Vec4 faster then the general setPositions function
[[NodeMesh:setNormals({Vec3()})|setNormals]]({Vec3()}) Set the full normal vertex Array in one call, takes Vec3
[[NodeMesh:setUvCoords({Vec2()})|setUvCoords]]({Vec2()}) Set the full uvCoords vertex Array in one call, takes Vec2
[[NodeMesh:setColors({})|setColors]]({}) Set the full Color vertex Array in one call, takes Vec3 or optionally Vec4
[[NodeMesh:setTangents({Vec3()})|setTangents]]({Vec3()}) Set the full Tagent vertex Array in one call, takes Vec3
[[NodeMesh:setIndices({number})|setIndices]]({number}) Set the all indices Array in one call, takes number
[[NodeMesh:setBoneWeights({Vec3()})|setBoneWeights]]({Vec3()}) Set the all Bone weights Array in one call, takes Vec3()
[[NodeMesh:setBoneIds({number})|setBoneIds]]({number}) 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()