Obi  6.4
Unified particle physics for Unity
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Obi.ObiPlantGenerator Class Reference

Public Types

enum  GeneratorType { Trunk, Branch, Leaves }
 

Public Member Functions

 ObiPlantGenerator (GeneratorType type, string name, int id, int parent)
 
void InitRNGState (int seed)
 
void StoreRNGState ()
 
void LoadRNGState ()
 
void GenerateNodes (ObiPlantGenerator parent)
 
ObiPlant.Node PlaceNode (ObiPathFrame section, Vector3 gravity, float angle, float normPos, int generatorId)
 
ObiPlant.Node PlaceLocalNode (float radius, float angle, float normPos, int generatorId)
 

Public Attributes

GeneratorType type = GeneratorType.Trunk
 
string name = "Generator"
 
int parent = -1
 
int id = 0
 
AnimationCurve shape = AnimationCurve.Constant(0,1,1)
 
float length = 5
 
float thickness = 0.2f
 
float resolution = 8
 
float growthRate = 1
 
float randomness = 0.1f
 
Color color = Color.white
 
float phototropism = 0.1f
 
float lightGrowthBoost = 1.5f
 
float thigmotropism = 0.1f
 
float massMultiplier = 1
 
float rigidness = 10
 
float frequency = 0.25f
 
int multiplicity = 1
 
float branchingProbability = 0.1f
 
AnimationCurve branchingCurve = AnimationCurve.Constant(0,1,1)
 
float spread = 0
 
float twirl = 0
 
Vector2 growthAngle = Vector2.zero
 
Vector2 horizontalAlign = Vector2.zero
 
float verticalRandomness = 0.2f
 
Vector2 distanceFromTrunk = Vector2.zero
 
ObiPlant.LeafType leafType = ObiPlant.LeafType.Square
 
Mesh customLeaf
 
Vector3 leafScale = Vector3.one
 
Vector2 sizeRange = new Vector2(1,2.5f)
 
float trunkScale = 0.5f
 
uint smoothness = 0
 
float curvatureDetail = 1
 
float perimeterDetail = 40
 
float thicknessScale = 1
 
Vector2 uvScale = new Vector2(1,1)
 
ObiList< ObiPlant.Nodenodes = new ObiList<ObiPlant.Node>()
 

Properties

GeneratorType Type [get]
 
float MaxParticleLength [get]
 

Detailed Description

Struct that holds data for a branch level: level, growth rate, etc.

Member Function Documentation

void Obi.ObiPlantGenerator.GenerateNodes ( ObiPlantGenerator  parent)

Pregenerate nodes:

Member Data Documentation

ObiList<ObiPlant.Node> Obi.ObiPlantGenerator.nodes = new ObiList<ObiPlant.Node>()

List of nodes generated

float Obi.ObiPlantGenerator.resolution = 8

amount of particles per length unit.


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