C# Class Universe.Physics.PrimMesher.SculptMesh

Show file Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Public Properties

Property Type Description
coords List
faces List
normals List
uvs List
viewerFaces List

Public Methods

Method Description
AddPos ( float x, float y, float z ) : void

Adds a value to each XYZ vertex coordinate in the mesh

AddRot ( Quat q ) : void

Rotates the mesh

Copy ( ) : SculptMesh

Duplicates a SculptMesh object. All object properties are copied by value, including lists.

DumpRaw ( string path, string name, string title ) : void
Scale ( float x, float y, float z ) : void
SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode ) : System
SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert ) : System
SculptMesh ( List rows, SculptType sculptType, bool viewerMode, bool mirror, bool invert ) : System
SculptMesh ( SculptMesh sm ) : System
SculptMesh ( float zMap, float xBegin, float xEnd, float yBegin, float yEnd, bool viewerMode ) : System

** Experimental ** May disappear from future versions ** not recommended for use in applications Construct a sculpt mesh from a 2D array of floats

SculptMesh ( string fileName, int sculptType, int lod, int viewerMode, int mirror, int invert ) : System
SculptMeshFromFile ( string fileName, SculptType sculptType, int lod, bool viewerMode ) : SculptMesh
_SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert ) : void
_SculptMesh ( List rows, SculptType sculptType, bool viewerMode, bool mirror, bool invert ) : void
calcVertexNormals ( SculptType sculptType, int xSize, int ySize ) : void

Private Methods

Method Description
bitmap2Coords ( Bitmap bitmap, int scale, bool mirror ) : List>

converts a bitmap to a list of lists of coords, while scaling the image. the scaling is done in floating point so as to allow for reduced vertex position quantization as the position will be averaged between pixel values. this routine will likely fail if the bitmap width and height are not powers of 2.

bitmap2CoordsSampled ( Bitmap bitmap, int scale, bool mirror ) : List>

Method Details

AddPos() public method

Adds a value to each XYZ vertex coordinate in the mesh
public AddPos ( float x, float y, float z ) : void
x float
y float
z float
return void

AddRot() public method

Rotates the mesh
public AddRot ( Quat q ) : void
q Quat
return void

Copy() public method

Duplicates a SculptMesh object. All object properties are copied by value, including lists.
public Copy ( ) : SculptMesh
return SculptMesh

DumpRaw() public method

public DumpRaw ( string path, string name, string title ) : void
path string
name string
title string
return void

Scale() public method

public Scale ( float x, float y, float z ) : void
x float
y float
z float
return void

SculptMesh() public method

public SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode ) : System
sculptBitmap System.Drawing.Bitmap
sculptType SculptType
lod int
viewerMode bool
return System

SculptMesh() public method

public SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert ) : System
sculptBitmap System.Drawing.Bitmap
sculptType SculptType
lod int
viewerMode bool
mirror bool
invert bool
return System

SculptMesh() public method

public SculptMesh ( List rows, SculptType sculptType, bool viewerMode, bool mirror, bool invert ) : System
rows List
sculptType SculptType
viewerMode bool
mirror bool
invert bool
return System

SculptMesh() public method

public SculptMesh ( SculptMesh sm ) : System
sm SculptMesh
return System

SculptMesh() public method

** Experimental ** May disappear from future versions ** not recommended for use in applications Construct a sculpt mesh from a 2D array of floats
public SculptMesh ( float zMap, float xBegin, float xEnd, float yBegin, float yEnd, bool viewerMode ) : System
zMap float
xBegin float
xEnd float
yBegin float
yEnd float
viewerMode bool
return System

SculptMesh() public method

public SculptMesh ( string fileName, int sculptType, int lod, int viewerMode, int mirror, int invert ) : System
fileName string
sculptType int
lod int
viewerMode int
mirror int
invert int
return System

SculptMeshFromFile() public method

public SculptMeshFromFile ( string fileName, SculptType sculptType, int lod, bool viewerMode ) : SculptMesh
fileName string
sculptType SculptType
lod int
viewerMode bool
return SculptMesh

_SculptMesh() public method

public _SculptMesh ( Bitmap sculptBitmap, SculptType sculptType, int lod, bool viewerMode, bool mirror, bool invert ) : void
sculptBitmap System.Drawing.Bitmap
sculptType SculptType
lod int
viewerMode bool
mirror bool
invert bool
return void

_SculptMesh() public method

public _SculptMesh ( List rows, SculptType sculptType, bool viewerMode, bool mirror, bool invert ) : void
rows List
sculptType SculptType
viewerMode bool
mirror bool
invert bool
return void

calcVertexNormals() public method

public calcVertexNormals ( SculptType sculptType, int xSize, int ySize ) : void
sculptType SculptType
xSize int
ySize int
return void

Property Details

coords public property

public List coords
return List

faces public property

public List faces
return List

normals public property

public List normals
return List

uvs public property

public List uvs
return List

viewerFaces public property

public List viewerFaces
return List