3D Surface Plotter  1.0.0
Create 3D Surface Charts for Any Math Function
Surface3DLib.SurfaceData Class Reference

A static class SurfaceData. More...

Classes

struct  VertexData
 VertexData struct. More...
 

Static Public Member Functions

static VertexData GetBuiltinData ()
 This method is used to create surface data. More...
 
static VertexData CreateData (Func< float, float, Vector3 > f, float XMin, float XMax, float ZMin, float ZMax)
 This method generates the surface data. More...
 
static void RotateObject (Transform transform)
 this method is used to rotate the game object. More...
 

Static Public Attributes

static ColormapEnum ColormapName = ColormapEnum.jet
 select colormap from the ColormapEnum enumeration. More...
 
static MathFunctionEnum BuiltinFunctionEnum = MathFunctionEnum.Sinc
 select a built-in math function from the MathFunctionEnum enumeration. More...
 
static List< float > Parameters = new List<float>()
 parameters used to create the math function. More...
 
static bool ColormapReverse = false
 whether or not reverse the colormap. More...
 
static bool UseCustomColormap = false
 whether use the built-in colormaps or custom colormap
 
static Gradient CustomColormap = new Gradient()
 Specify a custom colormap
 
static float Scale = 1f
 Scale used to set the default surface size
 
static float Aspect = 1f
 Set aspect ratio for the surface
 
static int XSegments = 101
 XSegments, divisions along the x direction
 
static int ZSegments = 101
 ZSegments, divisions along the z direction
 
static bool IsAnimation = false
 IsAnimation: whether perform animation or not
 

Detailed Description

A static class SurfaceData.

It contains methods to generate the vertex, colormap, uvs, and triangle (or index) data data for a 3D surface.

Member Function Documentation

◆ CreateData()

static VertexData Surface3DLib.SurfaceData.CreateData ( Func< float, float, Vector3 >  f,
float  XMin,
float  XMax,
float  ZMin,
float  ZMax 
)
static

This method generates the surface data.

It creates vertex, colormap, uv coordinate, and triangle (or index) data for a 3D surface described by a math function provided by the user.

Parameters
fa math function used to describe a simple 3D surface.
XMinthe minimum value of the x data range.
XMaxthe maximum value of the x data range.
ZMinthe minimum value of the z data range.
ZMaxthe maximum value of the z data range.
Returns
This method returns a VertexData struct. It contains the vertex, colormap, uv coords, and triangle (or index) data arrays.

◆ GetBuiltinData()

static VertexData Surface3DLib.SurfaceData.GetBuiltinData ( )
static

This method is used to create surface data.

It creates the vertex, colormap, uv coordinate, and triangle (or index) data for a 3D surface described by a built-in math function selected using MathFunctionEnum.

Returns
This method returns a VertexData struct. It contains vertex, colormap, uv coords, and triangle (or index) data arrays.

◆ RotateObject()

static void Surface3DLib.SurfaceData.RotateObject ( Transform  transform)
static

this method is used to rotate the game object.

Parameters
transformthis is the tranform attached to the game object.

Member Data Documentation

◆ BuiltinFunctionEnum

MathFunctionEnum Surface3DLib.SurfaceData.BuiltinFunctionEnum = MathFunctionEnum.Sinc
static

select a built-in math function from the MathFunctionEnum enumeration.

◆ ColormapName

ColormapEnum Surface3DLib.SurfaceData.ColormapName = ColormapEnum.jet
static

select colormap from the ColormapEnum enumeration.

◆ ColormapReverse

bool Surface3DLib.SurfaceData.ColormapReverse = false
static

whether or not reverse the colormap.

◆ Parameters

List<float> Surface3DLib.SurfaceData.Parameters = new List<float>()
static

parameters used to create the math function.