Curvy  4.0.0
CGModule Class Reference
+ Inheritance diagram for CGModule:
+ Collaboration diagram for CGModule:

Detailed Description

Curvy Generator module base class

Public Attributes

List< CGModuleLinkInputLinks = new List<CGModuleLink>()
 
List< CGModuleLinkOutputLinks = new List<CGModuleLink>()
 
CGModuleProperties Properties = new CGModuleProperties()
 
List< string > UIMessages = new List<string>()
 

Properties

bool Active [get, set]
 
bool CircularReferenceError [get, set]
 Whether this module has circular reference errors More...
 
bool Dirty [get, set]
 
CurvyGenerator Generator [get]
 
ModuleInfoAttribute Info [get]
 
List< CGModuleInputSlotInput [get]
 
Dictionary< string, CGModuleInputSlotInputByName [get]
 
virtual bool IsConfigured [get]
 Gets whether the module is properly configured i.e. has everything to work like intended More...
 
virtual bool IsInitialized [get]
 Gets whether the module and all its dependencies are fully initialized More...
 
string ModuleName [get, set]
 
CurvyCGEvent OnBeforeRefresh [get, set]
 
CurvyCGEvent OnRefresh [get, set]
 
List< CGModuleOutputSlotOutput [get]
 
Dictionary< string, CGModuleOutputSlotOutputByName [get]
 
bool RandomizeSeed [get, set]
 
int Seed [get, set]
 
int UniqueID [get]
 

Public Member Functions

Component AddManagedResource (string resourceName, string context="", int index=-1)
 
CGModule CopyTo (CurvyGenerator targetGenerator)
 
void Delete ()
 
void DeleteAllPrefabPools ()
 
void DeleteManagedResource (string resourceName, Component res, string context="", bool dontUsePool=false)
 
List< IPool > GetAllPrefabPools ()
 
CGModuleLink GetInputLink (CGModuleInputSlot inSlot, CGModuleOutputSlot outSlot)
 
List< CGModuleLinkGetInputLinks (CGModuleInputSlot inSlot)
 
CGModuleInputSlot GetInputSlot (string name)
 
List< CGModuleInputSlotGetInputSlots (System.Type filterType=null)
 
bool GetManagedResources (out List< Component > components, out List< string > componentNames)
 
CGModuleLink GetOutputLink (CGModuleOutputSlot outSlot, CGModuleInputSlot inSlot)
 
List< CGModuleLinkGetOutputLinks (CGModuleOutputSlot outSlot)
 
CGModuleOutputSlot GetOutputSlot (string name)
 
List< CGModuleOutputSlotGetOutputSlots (System.Type filterType=null)
 
void Initialize ()
 
bool IsManagedResource (Component res)
 
virtual void OnStateChange ()
 Called when a module's state changes (Link added/removed, Active toggles etc..) More...
 
virtual void OnTemplateCreated ()
 Called after a module was copied to a template More...
 
virtual void Refresh ()
 Add Module processing code in here More...
 
void ReInitializeLinkedSlots ()
 
virtual void Reset ()
 

Protected Member Functions

virtual void Awake ()
 
PrefabPool GetPrefabPool (GameObject prefab)
 
CurvyCGEventArgs OnBeforeRefreshEvent (CurvyCGEventArgs e)
 
virtual void OnDestroy ()
 
virtual void OnDisable ()
 
virtual void OnEnable ()
 
CurvyCGEventArgs OnRefreshEvent (CurvyCGEventArgs e)
 
void RenameResource (string resourceName, Component resource, int index=-1)
 

Static Protected Member Functions

static T GetRequestParameter< T > (ref CGDataRequestParameter[] requests)
 Gets a request parameter of a certain type More...
 
static void RemoveRequestParameter (ref CGDataRequestParameter[] requests, CGDataRequestParameter request)
 Removes a certain request parameter from the requests array More...
 

Member Function Documentation

Component AddManagedResource ( string  resourceName,
string  context = "",
int  index = -1 
)
virtual void Awake ( )
protectedvirtual
CGModule CopyTo ( CurvyGenerator  targetGenerator)
void Delete ( )
void DeleteAllPrefabPools ( )
void DeleteManagedResource ( string  resourceName,
Component  res,
string  context = "",
bool  dontUsePool = false 
)
List<IPool> GetAllPrefabPools ( )
CGModuleLink GetInputLink ( CGModuleInputSlot  inSlot,
CGModuleOutputSlot  outSlot 
)
List<CGModuleLink> GetInputLinks ( CGModuleInputSlot  inSlot)
CGModuleInputSlot GetInputSlot ( string  name)
List<CGModuleInputSlot> GetInputSlots ( System.Type  filterType = null)
bool GetManagedResources ( out List< Component >  components,
out List< string >  componentNames 
)
CGModuleLink GetOutputLink ( CGModuleOutputSlot  outSlot,
CGModuleInputSlot  inSlot 
)
List<CGModuleLink> GetOutputLinks ( CGModuleOutputSlot  outSlot)
CGModuleOutputSlot GetOutputSlot ( string  name)
List<CGModuleOutputSlot> GetOutputSlots ( System.Type  filterType = null)
PrefabPool GetPrefabPool ( GameObject  prefab)
protected
static T GetRequestParameter< T > ( ref CGDataRequestParameter[]  requests)
staticprotected

Gets a request parameter of a certain type

Template Parameters
TType derived from PCGDataRequestParameter
Parameters
requestsreference to the list of request parameters
Returns
the wanted request parameter or null
Type Constraints
T :CGDataRequestParameter 
void Initialize ( )
bool IsManagedResource ( Component  res)
CurvyCGEventArgs OnBeforeRefreshEvent ( CurvyCGEventArgs  e)
protected
virtual void OnDestroy ( )
protectedvirtual
virtual void OnDisable ( )
protectedvirtual
virtual void OnEnable ( )
protectedvirtual

Reimplemented in SplineInputModuleBase.

CurvyCGEventArgs OnRefreshEvent ( CurvyCGEventArgs  e)
protected
virtual void OnStateChange ( )
virtual

Called when a module's state changes (Link added/removed, Active toggles etc..)

Reimplemented in CreateMesh, BuildVolumeSpots, CreateGameObject, and InputSpots.

virtual void OnTemplateCreated ( )
virtual

Called after a module was copied to a template

Use this handle references that can't be templated etc...

Reimplemented in CreateMesh, InputSplinePath, CreateGameObject, InputMesh, and InputGameObject.

void ReInitializeLinkedSlots ( )
static void RemoveRequestParameter ( ref CGDataRequestParameter[]  requests,
CGDataRequestParameter  request 
)
staticprotected

Removes a certain request parameter from the requests array

Parameters
requestsreference to the requests array
requestthe request to remove
void RenameResource ( string  resourceName,
Component  resource,
int  index = -1 
)
protected
virtual void Reset ( )
virtual

Member Data Documentation

List<CGModuleLink> InputLinks = new List<CGModuleLink>()
List<CGModuleLink> OutputLinks = new List<CGModuleLink>()
List<string> UIMessages = new List<string>()

Property Documentation

bool Active
getset
bool CircularReferenceError
getset

Whether this module has circular reference errors

bool Dirty
getset
CurvyGenerator Generator
get
List<CGModuleInputSlot> Input
get
Dictionary<string, CGModuleInputSlot> InputByName
get
virtual bool IsConfigured
get

Gets whether the module is properly configured i.e. has everything to work like intended

virtual bool IsInitialized
get

Gets whether the module and all its dependencies are fully initialized

string ModuleName
getset
CurvyCGEvent OnBeforeRefresh
getset
CurvyCGEvent OnRefresh
getset
List<CGModuleOutputSlot> Output
get
Dictionary<string, CGModuleOutputSlot> OutputByName
get
bool RandomizeSeed
getset
int Seed
getset
int UniqueID
get

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