From a885d2a6ffe9d330e757469245064e5c825f3e9b Mon Sep 17 00:00:00 2001 From: Johan Berntsson Date: Wed, 14 Jan 2009 07:16:03 +0000 Subject: [PATCH] Added a primitive shape function for spheres --- OpenSim/Framework/PrimitiveBaseShape.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index adb55aa874..2dfc3213da 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -247,6 +247,18 @@ namespace OpenSim.Framework return shape; } + public static PrimitiveBaseShape CreateSphere() + { + PrimitiveBaseShape shape = Create(); + + shape._pathCurve = (byte) Extrusion.Curve1; + shape._profileShape = ProfileShape.HalfCircle; + shape._pathScaleX = 100; + shape._pathScaleY = 100; + + return shape; + } + public static PrimitiveBaseShape CreateCylinder() { PrimitiveBaseShape shape = Create();