Chunks
Moddable voxel sandbox for room-scale VR.
Classes | Static Public Attributes | Protected Member Functions | Properties | List of all members
Chunks.Geometry.Surface Class Reference

A resource containing the graphics and physics info for a block face. More...

Inheritance diagram for Chunks.Geometry.Surface:
Chunks.Plugins.PluginResource

Classes

class  TilesInfo
 

Static Public Attributes

static readonly Surface Blank
 A transparent, non-solid surface. More...
 

Protected Member Functions

override void OnReadDefinition (JToken token, string directory)
 When overridden in an inheriting class, handles reading information about the resource from a json token. More...
 
- Protected Member Functions inherited from Chunks.Plugins.PluginResource
 PluginResource ()
 
void AssertIsValid ()
 
virtual void OnInitialize ()
 
ResourceName GetResourceName (JToken token)
 Converts a json token to a resource name, associating it with the current namespace. Only valid from within OnReadDefinition. More...
 
ResourceName GetResourceName (JToken token, ResourceName @default)
 Converts a json token to a resource name, associating it with the current namespace. Only valid from within OnReadDefinition. If the token is null, default is used. More...
 

Properties

bool IsSolid [get]
 If true, this surface blocks raycasts and bounding box sweeps. More...
 
bool IsOpaque [get]
 If true, faces flush with this one are considered hidden. More...
 
int TextureIndex [get]
 Dynamically assigned texture index in the main texture atlas. More...
 
Color Color [get]
 
- Properties inherited from Chunks.Plugins.PluginResource
Plugin Plugin [get]
 Plugin this resource was loaded from. More...
 
ResourceName Name [get]
 Name of this resource. More...
 

Additional Inherited Members

- Public Member Functions inherited from Chunks.Plugins.PluginResource
override string ToString ()
 Returns the fully qualified name of this resource. More...
 
- Public Attributes inherited from Chunks.Plugins.PluginResource
bool IsValid => Plugin == null || Plugin.IsLoaded
 

Detailed Description

A resource containing the graphics and physics info for a block face.

Member Function Documentation

override void Chunks.Geometry.Surface.OnReadDefinition ( JToken  token,
string  directory 
)
protectedvirtual

When overridden in an inheriting class, handles reading information about the resource from a json token.

Parameters
tokenToken to load the resource from
directoryLocation of the loaded json file's parent directory

Reimplemented from Chunks.Plugins.PluginResource.

Member Data Documentation

readonly Surface Chunks.Geometry.Surface.Blank
static
Initial value:
= new Surface
{
_isSolid = false,
_isOpaque = false,
_textureIndex = -1
}

A transparent, non-solid surface.

Property Documentation

Color Chunks.Geometry.Surface.Color
get
bool Chunks.Geometry.Surface.IsOpaque
get

If true, faces flush with this one are considered hidden.

bool Chunks.Geometry.Surface.IsSolid
get

If true, this surface blocks raycasts and bounding box sweeps.

int Chunks.Geometry.Surface.TextureIndex
get

Dynamically assigned texture index in the main texture atlas.


The documentation for this class was generated from the following file: