Creates a new material to be used by 3D primitive items (points, lines, boxes).
The color is expressed as a Vector4, RGBA (Red, Green, Blue, Alpha), Red = pRGBAColor.x, etc...
Color values are expressed from 0 to 1. An alpha value of 1 means an opaque color, an alpha value of 0 means a transparent color.
The primitive material id of the newly created material.
Gets the color of an existing material.
If found, pRGBAColorOut is updated.
Returns true if the primitive material is found and therefore pRGBAColorOut is updated.
primitive material id of the material to query.true if pRGBAColorOut was updated.
Removes all materials.
This also removes all primitives. This is equivalent to PrimitiveManagerInterface.removeAllPrimitives.
Removes the given material.
The primitive material id pMaterialId should be valid and should not be currently used by any other primitive.
If pMaterialId is in use, then the function returns false and the material is not removed.
true if the material has been removed.
Updates the color of an existing material.
Returns true if a primitive material with the given primitive material id exists.
primitive material id of the material to update.true if the material exists and is therefore updated.
The PrimitiveManagerMaterialInterface is used to change the colors of 3D primitives : Points, lines and boxes.
The PrimitiveManagerMaterialInterface is accessed through the PrimitiveManagerInterface.getPrimitiveMaterialManager function (the PrimitiveManagerInterface is accessed through InfiniteEngineInterface.getPrimitiveManager).
The color is expressed as a Vector4, RGBA (Red, Green, Blue, Alpha), Red = pRGBAColor.x, etc...
Color values are expressed from 0 to 1. An alpha value of 1 means an opaque color, an alpha value of 0 means a transparent color.
Materials are expressed and manipulated as strictly positive ids : a
primitive material id. Aprimitive material idof 0 is invalid. There is a limit on the number of materials that may be created. The getMaxAvailablePrimitiveMaterials tells the number of primitive materials that may be created.Materials can be modified and removed. However materials used by 3D primitives are protected from removal until no primitive uses them.
WARNING : do not confuse the PrimitiveManagerMaterialInterface and the MaterialManagerInterface, these two interfaces are separated, do not use MaterialManagerInterface ids to draw 3D primitives !!!
Changing material may be done with the following :
You may create boxes, points, etc with PrimitiveManagerBoxInterface, PrimitiveManagerPointInterface, etc.
See