Table of Contents

Class GSplineCreator

Namespace
Pinwheel.Griffin.SplineTool
Assembly
Pinwheel.Polaris.Runtime.dll

A component for creating splines in the scene. Splines can have branches and loops. You can also add GSplineModifier to this game object to perform some actions such as making ramps, rivers, paint paths, spawn and remove foliage, etc. based on the spline's shape.

[Serializable]
[ExecuteInEditMode]
public class GSplineCreator : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
GSplineCreator
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.transform
Component.gameObject
Component.tag
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Properties

EnableTerrainMask

Use terrain mask texture (R) to lock a region from being edited.

GroupId

The terrain group that will be affected by this spline and its modifiers.

InitialRotation

Initial rotation for new anchors when adding to this spline if Auto Tangent is off. Mostly used by the editor. When adding new anchors via script, this takes no effect.

InitialScale

Initial scale for new anchors when adding to this spline. Mostly used by the editor. When adding new anchors via script, this takes no effect.

PositionOffset

Offset the new anchor position from mouse raycast hit point when adding to this spline. Mostly used by the editor. When adding new anchors via script, this takes no effect.

Spline

The spline created by this component, containing all anchor points, tangents and segments.

Methods

CleanUp()
GenerateWorldVerticesAndAlphas(Vector3[], float[], int, float, float)

Generate the spline mesh containing only vertices (triangle list, 3 consecutive vertices for 1 triangle) and alpha channel for each vertices. Acquire the exact vertex count for pre-allocated array with GetVerticesCount(int, float, float).

GetVerticesCount(int, float, float)

Retrieve the exact number of vertex for the spline mesh.

MarkSplineChanged(GSplineCreator)

Notify subscribers that a spline has been edited. Other scripts should subscribe to the SplineChanged event.

SweepDirtyRect(GStylizedTerrain, int, float, float)

Sweep against a terrain to retrieve a collection of region that affected by this spline.

SweepTest(int, float, float)

Perform a sweep test against terrains in the scene.

Events

SplineChanged

An event signalling that the spline was changed (editing anchor, tangents, etc.). To raise this event, call MarkSplineChanged(GSplineCreator).