Create a new sphere geometry
defines the unique ID of the geometry
defines the hosting scene
defines the number of segments to use to create the sphere
defines the diameter of the sphere
defines if the geometry supports being regenerated with new parameters (false by default)
defines the hosting mesh (can be null)
defines if the created geometry is double sided or not (default is BABYLON.Mesh.DEFAULTSIDE)
Gets or sets the Bias Vector to apply on the bounding elements (box/sphere), the max extend is computed as v += v bias.x + bias.y, the min is computed as v -= v bias.x + bias.y
Gets the delay loading state of the geometry (none by default which means not delayed)
Gets the file containing the data to load when running in delay load state
Defines the diameter of the sphere
Gets a value indicating that the geometry should not be serialized
Gets the current extend of the geometry
Gets or sets the unique ID of the geometry
Callback called when the geometry is updated
Defines the number of segments to use to create the sphere
Defines if the created geometry is double sided or not (default is BABYLON.Mesh.DEFAULTSIDE)
Apply current geometry to a given mesh
defines the mesh to apply geometry to
Clone the geometry
defines the unique ID of the new geometry
the new geometry
Gets a value indicating if the geometry supports being regenerated with new parameters (false by default)
true if the geometry can be regenerated
Free all associated resources
Gets the hosting engine
the hosting {BABYLON.Engine}
Gets the index buffer
the index buffer
Gets the index buffer array
defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes
the index buffer array
Gets the hosting scene
the hosting {BABYLON.Scene}
Return the total number of indices
the total number of indices
Gets total number of vertices
the total number of vertices
Gets a specific vertex buffer
defines the data kind (Position, normal, etc...)
a {BABYLON.VertexBuffer}
Returns all vertex buffers
an object holding all vertex buffers indexed by kind
Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.
defines the data kind (Position, normal, etc...)
defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes
defines a boolean indicating that the returned array must be cloned upon returning it
a float array containing vertex data
Gets a list of all attached data kinds (Position, normal, etc...)
a list of string containing all kinds
Gets a value indicating if the geometry is disposed
true if the geometry was disposed
Defines if the geometry is ready to use
true if the geometry is ready to be used
Returns a boolean defining if the vertex data for the requested kind
is updatable
defines the data kind (Position, normal, etc...)
true if the vertex buffer with the specified kind is updatable
Gets a boolean indicating if specific vertex buffer is present
defines the data kind (Position, normal, etc...)
true if data is present
Load the geometry if it was flagged as delay loaded
defines the hosting scene
defines a callback called when the geometry is loaded
If the geometry supports regeneration, the function will recreates the geometry with updated parameter values
Release the associated resources for a specific mesh
defines the source mesh
defines if the geometry must be disposed if there is no more mesh pointing to it
Removes a specific vertex data
defines the data kind (Position, normal, etc...)
Serialize all vertices data into a JSON oject
a JSON representation of the current geometry data
Creates a new index buffer
defines the indices to store in the index buffer
defines the total number of vertices (could be null)
defines if the index buffer must be flagged as updatable (false by default)
Affect a vertex buffer to the geometry. the vertexBuffer.getKind() function is used to determine where to store the data
defines the vertex buffer to use
defines the total number of vertices for position kind (could be null)
Invert the geometry to move from a right handed system to a left handed one.
Update index buffer
defines the indices to store in the index buffer
defines the offset in the target buffer where to store the data
Update a specific vertex buffer This function will create a new buffer if the current one is not updatable
defines the data kind (Position, normal, etc...)
defines the data to use
defines if the geometry extends must be recomputed (false by default)
Update a specific vertex buffer This function will directly update the underlying WebGLBuffer according to the passed numeric array or Float32Array It will do nothing if the buffer is not updatable
defines the data kind (Position, normal, etc...)
defines the data to use
defines the offset in the target buffer where to store the data
set to true if the offset is in bytes
You should now use Tools.RandomId(), this method is still here for legacy reasons. Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523 Be aware Math.random() could cause collisions, but: "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
a string containing a new GUID
Generated using TypeDoc
Creates a sphere geometry
see http://doc.babylonjs.com/how_to/set_shapes#sphere