Rock Factory  1.0
Unity3d component package for procedural rocks
 All Classes Functions Variables Enumerations Properties
RFRockProc Class Reference

Rock Factory processor Core engine used by RFRock to generate a mesh. More...

List of all members.

Public Types

enum  RFRockTextureCoordinates { None, Box, Foldout }
enum  RFRockPatchTypes { SlicedEqually, Delaunay, DelaunayByHeight }

Public Member Functions

 RFRockProc ()
 Initializes a new instance of the RFRockProc class.
void Reset ()
 Reset this instance.
Vector3 Spherize (Vector3 v)
 Convert vector to spherical space
void GenerateRock (RFRock rockGen, Texture2D[] displacementMaps)
 Generates the rock.

Public Attributes

Mesh mesh
 Reference to the internal mesh object
List< Vector3 > vertices
 All vertices generated by the processor.
List< int > faces
 All triangles generated by the processor.
List< Vector3 > normals
 All normals generated by the processor.
List< Vector2 > UVs
 All UV coordinates generated by the processor.
List< Vector2 > boxUVs
 All planar-per-side (box) UV coordinates generated by the processor.
List< Color > colors
 All vertex colors generated by the processor.
RFRockSideIndices sideIndices
 All start and end indices of all sides in the vertices array
Dictionary< RFRockSideTypes,
Dictionary< int, List< Vector3 > > > 
isolinesCache = null
 Cache storage for calculated contour lines with corresponding heigths per side

Properties

int numberOfVertices [get, set]
 Total number of vertices in the mesh.
int numberOfFaces [get, set]
 Total number of triangles in the mesh.

Detailed Description

Rock Factory processor Core engine used by RFRock to generate a mesh.


Member Enumeration Documentation

Enumerator:
SlicedEqually 

Geometry is based on grid of equally sized patches

Delaunay 

Geometry is based on random placed points within a Delaunay pattern

DelaunayByHeight 

Geometry is based on predefined points based on given contour lines and rules derived from a displacement map

Enumerator:
None 

No texture coordinates

Box 

Box projected texture coordinates (planar coordinates per side)

Foldout 

Unwrapped texture coordinates (2 textures per texture)


Constructor & Destructor Documentation

Initializes a new instance of the RFRockProc class.


Member Function Documentation

void GenerateRock ( RFRock  rockGen,
Texture2D[]  displacementMaps 
)

Generates the rock.

Parameters:
rockGenRock class reference.
displacementMapsDisplacement maps per side.
void Reset ( )

Reset this instance.

Vector3 Spherize ( Vector3  v)

Convert vector to spherical space

Parameters:
vVector to deform

Member Data Documentation

List<Vector2> boxUVs

All planar-per-side (box) UV coordinates generated by the processor.

List<Color> colors

All vertex colors generated by the processor.

List<int> faces

All triangles generated by the processor.

Dictionary<RFRockSideTypes, Dictionary<int, List<Vector3> > > isolinesCache = null

Cache storage for calculated contour lines with corresponding heigths per side

Mesh mesh

Reference to the internal mesh object

List<Vector3> normals

All normals generated by the processor.

RFRockSideIndices sideIndices

All start and end indices of all sides in the vertices array

List<Vector2> UVs

All UV coordinates generated by the processor.

List<Vector3> vertices

All vertices generated by the processor.


Property Documentation

int numberOfFaces
getset

Total number of triangles in the mesh.

int numberOfVertices
getset

Total number of vertices in the mesh.


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