public void SetOrigin(Vector3 origin) { if (m_Origin == origin) { return; } m_Origin = origin; GeometryUpdated.Invoke(); }
public void SetCoefficient(float coef) { if (coef < 0) { return; } m_Coefficient = coef; GeometryUpdated.Invoke(); }
public void SetPointPosition(int pointIndex, Vector3 position) { if (pointIndex < 0 || pointIndex >= m_PointsPositions.Count) { return; } m_PointsPositions[pointIndex] = position; GeometryUpdated.Invoke(); }
private void OnDeserialized() { AddToMyShapeDatas(PointData); PointsNotSameValidator = new PointsNotSameValidator(EnumeratePoints()); LinesIntersectValidator = new LinesIntersectValidator(this); PointData.NameUpdated.Subscribe(NameUpdated); GeometryUpdated.Invoke(); }
public void SetAxis(int axisNum, Vector3 axis) { if (axisNum < 0 || axisNum >= 3) { return; } m_Axes[axisNum] = axis; NonZeroVolumeValidator.Update(); GeometryUpdated.Invoke(); }
public void SetRadius(float radius) { if (radius < 0) { return; } m_Radius = radius; GeometryUpdated.Invoke(); }
public void SetLength(float length) { if (length < 0) { return; } m_Length = length; //NonZeroVolumeValidator.Update(); GeometryUpdated.Invoke(); }
private void OnDeserialized() { AddToMyShapeDatas(PointData); TargetPointsNotSameValidator = new PointsNotSameValidator(EnumerateTargetPoints()); ParallelPointsNotSameValidator = new PointsNotSameValidator(EnumerateParallelPoints()); PointData.NameUpdated.Subscribe(NameUpdated); ProjectionAlongLineValidator = new ProjectionAlongLineValidator(this); GeometryUpdated.Invoke(); }
public void SetBaseVerticesCount(int count) { if (count > 8 || count < 3) { return; } m_VerticesAtTheBaseCount = count; Clear(); ConstructPrism(); GeometryUpdated.Invoke(); }
public void SetProjectedPoint(PointData pointData) { if (m_ProjectedPoint == pointData) { return; } if (m_ProjectedPoint != null) { m_ProjectedPoint.GeometryUpdated.Unsubscribe(GeometryUpdated); } m_ProjectedPoint = pointData; if (m_ProjectedPoint != null) { m_ProjectedPoint.GeometryUpdated.Subscribe(GeometryUpdated); } GeometryUpdated.Invoke(); }
private void OnDeserialized() { //NonZeroVolumeValidator = new NonZeroVolumeValidator(m_Axes); //NonZeroVolumeValidator.Update(); GeometryUpdated.Invoke(); foreach (var shapeData in new [] { m_CompositeShapeData }.Cast <ShapeData>() .Concat(m_Points) .Concat(m_Lines) .Concat(m_Polygons)) { AddToMyShapeDatas(shapeData); } m_CompositeShapeData.SetShapeName("Cube"); }
public void SetSecondPointOnTargetLine(PointData pointData) { if (m_SecondPointOnTargetLine == pointData) { return; } if (m_SecondPointOnTargetLine != null) { m_SecondPointOnTargetLine.GeometryUpdated.Unsubscribe(GeometryUpdated); } m_SecondPointOnTargetLine = pointData; if (m_SecondPointOnTargetLine != null) { m_SecondPointOnTargetLine.GeometryUpdated.Subscribe(GeometryUpdated); } GeometryUpdated.Invoke(); }
public void SetFirstPointOnParallelLine(PointData pointData) { if (m_FirstPointOnParallelLine == pointData) { return; } if (m_FirstPointOnParallelLine != null) { m_FirstPointOnParallelLine.GeometryUpdated.Unsubscribe(GeometryUpdated); } m_FirstPointOnParallelLine = pointData; if (m_FirstPointOnParallelLine != null) { m_FirstPointOnParallelLine.GeometryUpdated.Subscribe(GeometryUpdated); } GeometryUpdated.Invoke(); }
public void SetPoint(int lineNum, int pointNum, PointData pointData) { if (m_PointsOnLines[lineNum][pointNum] == pointData) { return; } if (m_PointsOnLines[lineNum][pointNum] != null) { m_PointsOnLines[lineNum][pointNum].GeometryUpdated.Unsubscribe(GeometryUpdated); } m_PointsOnLines[lineNum][pointNum] = pointData; if (m_PointsOnLines[lineNum][pointNum] != null) { m_PointsOnLines[lineNum][pointNum].GeometryUpdated.Subscribe(GeometryUpdated); } GeometryUpdated.Invoke(); }
public void SetOrigin(Vector3 origin) { m_Origin = origin; GeometryUpdated.Invoke(); }
private void OnDeserialized() { GeometryUpdated.Invoke(); m_CompositeShapeData.SetShapeName("Prism"); }
public void SetOffset(Vector3 offset) { m_Offset = offset; GeometryUpdated.Invoke(); }
/// <summary> /// </summary> protected void InvokeGeometryUpdated() { GeometryUpdated?.Invoke(); }