> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksconemeshfactory.md).

# Class ksConeMeshFactory

Namespace: [KS.Reactor.Client.Unity](/reactor/api-reference/ks.reactor.client.unity.md)\
Assembly: KSUnity-Source.dll

Factory for generating cone meshes. Caches meshes for resuse.

```csharp
public class ksConeMeshFactory
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksConeMeshFactory](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksconemeshfactory.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### GenerateMesh(float, float, Axis, int) <a href="#ks_reactor_client_unity_ksconemeshfactory_generatemesh_system_single_system_single_ks_reactor_ksshap" id="ks_reactor_client_unity_ksconemeshfactory_generatemesh_system_single_system_single_ks_reactor_ksshap"></a>

Gets a cone mesh from the cache or generates one.

```csharp
public Mesh GenerateMesh(float radius, float height, ksShape.Axis direction, int numSides)
```

#### Parameters

`radius` [float](https://learn.microsoft.com/dotnet/api/system.single)

Radius

`height` [float](https://learn.microsoft.com/dotnet/api/system.single)

Height. Negative to invert the cone.

`direction` [ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[Axis](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.axis.md)

Axis alignment.

`numSides` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Number of sides.

#### Returns

Mesh

Cone mesh

### GenerateTriangles(float, int) <a href="#ks_reactor_client_unity_ksconemeshfactory_generatetriangles_system_single_system_int32" id="ks_reactor_client_unity_ksconemeshfactory_generatetriangles_system_single_system_int32"></a>

```csharp
public static int[] GenerateTriangles(float height, int numSides)
```

#### Parameters

`height` [float](https://learn.microsoft.com/dotnet/api/system.single)

`numSides` [int](https://learn.microsoft.com/dotnet/api/system.int32)

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

### GenerateVertices(float, float, Axis, int) <a href="#ks_reactor_client_unity_ksconemeshfactory_generatevertices_system_single_system_single_ks_reactor_ks" id="ks_reactor_client_unity_ksconemeshfactory_generatevertices_system_single_system_single_ks_reactor_ks"></a>

```csharp
public static Vector3[] GenerateVertices(float radius, float height, ksShape.Axis direction, int numSides)
```

#### Parameters

`radius` [float](https://learn.microsoft.com/dotnet/api/system.single)

`height` [float](https://learn.microsoft.com/dotnet/api/system.single)

`direction` [ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[Axis](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.axis.md)

`numSides` [int](https://learn.microsoft.com/dotnet/api/system.int32)

#### Returns

Vector3\[]

### GetMesh(float, float, Axis, int) <a href="#ks_reactor_client_unity_ksconemeshfactory_getmesh_system_single_system_single_ks_reactor_ksshape_axi" id="ks_reactor_client_unity_ksconemeshfactory_getmesh_system_single_system_single_ks_reactor_ksshape_axi"></a>

Gets a cone mesh from the cache or generates one.

```csharp
public static Mesh GetMesh(float radius, float height, ksShape.Axis direction, int numSides)
```

#### Parameters

`radius` [float](https://learn.microsoft.com/dotnet/api/system.single)

Radius

`height` [float](https://learn.microsoft.com/dotnet/api/system.single)

Height. Negative to invert the cone.

`direction` [ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[Axis](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.axis.md)

Axis alignment.

`numSides` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Number of sides.

#### Returns

Mesh

Cone mesh
