Constructor
new Solid(shape, material, ptMaterial)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
shape |
Shape | the shape of the solid |
material |
Material | the material of the solid |
ptMaterial |
PTMaterial | material for path tracing (optional) |
Classes
Members
isRendered
- Source:
Says whether the solid should be rendered or not. The property can be used to define solids that will appear later in the scene (because of some animation, game event, etc) without having to rebuild the shader. Default is true.
isSolid :boolean
- Source:
Say if the item is a solid
Type:
- boolean
material :Material
- Source:
The material of the solid
Type:
ptMaterial :PTMaterial
- Source:
The material of the solid for path tracing
Type:
shape :Shape
- Source:
The shape of the solids
Type:
Methods
glslInstance() → {string}
- Source:
Return a chunk of GLSL code used to compute the color of the solid. This computation may involve normal and/or UV coordinates. This is automatically determined from the properties of the material.
Returns:
- Type
- string
onAdd(scene)
- Source:
Additional actions to perform when the object is added to the scene. By default, propagate the call.
Parameters:
Name | Type | Description |
---|---|---|
scene |
Scene | the scene to which the object is added. |
setId(scene)
- Source:
Set the ID of the shape. Propagate the process if needed.
Parameters:
Name | Type | Description |
---|---|---|
scene |
Scene | the scene to which the object is added. |
updateData()
- Source:
Update the data of the underlying shape. It should also update the data of all itd children.