From c47bca94d23420b164e5f32aa5c781009496e0d3 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 15 Aug 2007 16:57:47 +0000 Subject: * Exploring Group/Part from an app perspective. --- .../Framework/General/Types/PrimitiveBaseShape.cs | 46 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/General/Types/PrimitiveBaseShape.cs') diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 045569b..577c8a2 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs @@ -110,10 +110,11 @@ namespace OpenSim.Framework.Types } } - + public class BoxShape : PrimitiveBaseShape { - public BoxShape() : base() + public BoxShape() + : base() { PathCurve = 16; ProfileShape = ProfileShape.Square; @@ -121,10 +122,16 @@ namespace OpenSim.Framework.Types PathScaleX = 100; PathScaleY = 100; } - - public void SetSide( float side ) + + public BoxShape(float side) + : base() + { + SetSide(side); + } + + public void SetSide(float side) { - Scale = new LLVector3( side, side, side ); + Scale = new LLVector3(side, side, side); } public static BoxShape Default @@ -139,4 +146,33 @@ namespace OpenSim.Framework.Types } } } + public class CylinderShape : PrimitiveBaseShape + { + public CylinderShape() + : base() + { + PathCurve = 16; + ProfileShape = ProfileShape.Circle; + PCode = 9; + PathScaleX = 100; + PathScaleY = 100; + } + + public CylinderShape(float radius, float heigth) + : base() + { + SetRadius(radius); + SetHeigth(heigth); + } + + private void SetHeigth(float heigth) + { + Scale.Y = heigth; + } + + private void SetRadius(float radius) + { + Scale.X = Scale.Y = radius*2f; + } + } } -- cgit v1.1