Table of Contents

Class CynGlass

Namespace
Global
Assembly
Assembly-CSharp.dll
public static class CynGlass
Inheritance
CynGlass
Inherited Members

Fields

shapePool

public static CynTinyListPool<Vector2> shapePool

Field Value

CynTinyListPool<Vector2>

Methods

Angle(double, double, double, double)

public static double Angle(double fromX, double fromY, double toX, double toY)

Parameters

fromX double
fromY double
toX double
toY double

Returns

double

Angle(Vector2, Vector2)

public static float Angle(Vector2 fromDir, Vector2 toDir)

Parameters

fromDir Vector2
toDir Vector2

Returns

float

AreaOf(List<Vector2>)

public static float AreaOf(List<Vector2> shape)

Parameters

shape List<Vector2>

Returns

float

BoundsOf(List<Shape>)

public static Rect BoundsOf(List<CynGlass.Shape> shapes)

Parameters

shapes List<CynGlass.Shape>

Returns

Rect

BoundsOf(List<Rect>)

public static Rect BoundsOf(List<Rect> rects)

Parameters

rects List<Rect>

Returns

Rect

BoundsOf(List<Vector2>)

public static Rect BoundsOf(List<Vector2> shape)

Parameters

shape List<Vector2>

Returns

Rect

CenterOf(List<Vector2>)

public static Vector2 CenterOf(List<Vector2> shape)

Parameters

shape List<Vector2>

Returns

Vector2

CopyShape(List<Vector2>, List<Vector2>)

public static void CopyShape(List<Vector2> from, List<Vector2> to)

Parameters

from List<Vector2>
to List<Vector2>

CutShape(List<Vector2>, BreakableGlassPattern, Vector2, float, Vector2, List<List<Vector2>>)

public static void CutShape(List<Vector2> shape, BreakableGlassPattern pattern, Vector2 patternPosition, float patternRotation, Vector2 patternScale, List<List<Vector2>> results)

Parameters

shape List<Vector2>
pattern BreakableGlassPattern
patternPosition Vector2
patternRotation float
patternScale Vector2
results List<List<Vector2>>

CutShape(List<Vector2>, List<List<Vector2>>, Vector2, float, Vector2, List<List<Vector2>>)

public static void CutShape(List<Vector2> shape, List<List<Vector2>> pattern, Vector2 patternPosition, float patternRotation, Vector2 patternScale, List<List<Vector2>> results)

Parameters

shape List<Vector2>
pattern List<List<Vector2>>
patternPosition Vector2
patternRotation float
patternScale Vector2
results List<List<Vector2>>

DistanceToShape(Vector2, List<Vector2>)

public static float DistanceToShape(Vector2 point, List<Vector2> shape)

Parameters

point Vector2
shape List<Vector2>

Returns

float

FindShapeByPoint(Vector2, List<List<Vector2>>, out int)

public static bool FindShapeByPoint(Vector2 point, List<List<Vector2>> shapes, out int index)

Parameters

point Vector2
shapes List<List<Vector2>>
index int

Returns

bool

IntersectConvexShapes(List<Vector2>, List<Vector2>, List<Vector2>)

public static bool IntersectConvexShapes(List<Vector2> shapeA, List<Vector2> shapeB, List<Vector2> results)

Parameters

shapeA List<Vector2>
shapeB List<Vector2>
results List<Vector2>

Returns

bool

InverseTransformShape(List<Vector2>, Vector2, float, Vector2)

public static void InverseTransformShape(List<Vector2> shape, Vector2 position, float rotation, Vector2 scale)

Parameters

shape List<Vector2>
position Vector2
rotation float
scale Vector2

IsInsideShape(Vector2, List<Vector2>)

public static bool IsInsideShape(Vector2 point, List<Vector2> shape)

Parameters

point Vector2
shape List<Vector2>

Returns

bool

IsTouching(List<Vector2>, List<Vector2>, float)

public static bool IsTouching(List<Vector2> shapeA, List<Vector2> shapeB, float threshold)

Parameters

shapeA List<Vector2>
shapeB List<Vector2>
threshold float

Returns

bool

IsTouching(Vector2, List<Vector2>, float)

public static bool IsTouching(Vector2 point, List<Vector2> shape, float threshold)

Parameters

point Vector2
shape List<Vector2>
threshold float

Returns

bool

MeshToShape(List<Vector3>, float)

public static List<Vector2> MeshToShape(List<Vector3> vertices, float mergeAngle = 1)

Parameters

vertices List<Vector3>
mergeAngle float

Returns

List<Vector2>

MeshToShape(List<Vector3>, out float, float)

public static List<Vector2> MeshToShape(List<Vector3> vertices, out float thickness, float mergeAngle = 1)

Parameters

vertices List<Vector3>
thickness float
mergeAngle float

Returns

List<Vector2>

MeshToShape(Vector3[], float)

public static List<Vector2> MeshToShape(Vector3[] vertices, float mergeAngle = 1)

Parameters

vertices Vector3[]
mergeAngle float

Returns

List<Vector2>

MeshToShape(Vector3[], out float, float)

public static List<Vector2> MeshToShape(Vector3[] vertices, out float thickness, float mergeAngle = 1)

Parameters

vertices Vector3[]
thickness float
mergeAngle float

Returns

List<Vector2>

PrefabToPattern(GameObject, float)

public static List<CynGlass.Shape> PrefabToPattern(GameObject sourcePrefab, float mergeAngle = 1)

Parameters

sourcePrefab GameObject
mergeAngle float

Returns

List<CynGlass.Shape>

PrefabToShapes(GameObject, float)

public static List<List<Vector2>> PrefabToShapes(GameObject sourcePrefab, float mergeAngle = 1)

Parameters

sourcePrefab GameObject
mergeAngle float

Returns

List<List<Vector2>>

RayPlaneIntersection(Vector3, Vector3, Vector3, Vector3, out Vector3)

public static bool RayPlaneIntersection(Vector3 rayOrigin, Vector3 rayDirection, Vector3 planePosition, Vector3 planeNormal, out Vector3 hitPoint)

Parameters

rayOrigin Vector3
rayDirection Vector3
planePosition Vector3
planeNormal Vector3
hitPoint Vector3

Returns

bool

ShapeToMesh(List<Vector2>, float, Vector2, Mesh)

public static void ShapeToMesh(List<Vector2> shape, float thickness, Vector2 uvOrigin, Mesh mesh)

Parameters

shape List<Vector2>
thickness float
uvOrigin Vector2
mesh Mesh

ShapesToPattern(List<List<Vector2>>)

public static List<CynGlass.Shape> ShapesToPattern(List<List<Vector2>> shapes)

Parameters

shapes List<List<Vector2>>

Returns

List<CynGlass.Shape>

SignedAngle(double, double, double, double)

public static double SignedAngle(double fromX, double fromY, double toX, double toY)

Parameters

fromX double
fromY double
toX double
toY double

Returns

double

SignedAngle(Vector2, Vector2)

public static float SignedAngle(Vector2 fromDir, Vector2 toDir)

Parameters

fromDir Vector2
toDir Vector2

Returns

float

TransformShape(List<Vector2>, Vector2, float, Vector2)

public static void TransformShape(List<Vector2> shape, Vector2 position, float rotation, Vector2 scale)

Parameters

shape List<Vector2>
position Vector2
rotation float
scale Vector2