Package renderer.models_L
Class Circle
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.Circle
-
-
Field Summary
Fields Modifier and Type Field Description intndoubler-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
Constructor Summary
Constructors Constructor Description Circle()Create a circle in the xy-plane with radius 1 and with 16 line segments around the circumference.Circle(double r)Create a circle in the xy-plane with radiusrand with 16 line segments around the circumference.Circle(double r, int n)Create a circle in the xy-plane with radiusrand withnline segments around the circumference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHorzCount()intgetVertCount()Circleremake(int n, int k)Build an instance of theModelwith new values for the number of lines of latitude and longitude while keeping all the other model parameters the same.-
Methods inherited from class renderer.scene.Model
addColor, addPrimitive, addVertex, getPrimitive, toString
-
-
-
-
Constructor Detail
-
Circle
public Circle()
Create a circle in the xy-plane with radius 1 and with 16 line segments around the circumference.
-
Circle
public Circle(double r)
Create a circle in the xy-plane with radiusrand with 16 line segments around the circumference.- Parameters:
r- radius of the circle
-
Circle
public Circle(double r, int n)
Create a circle in the xy-plane with radiusrand withnline segments around the circumference.- Parameters:
r- radius of the circlen- number of line segments in the circle's circumference- Throws:
IllegalArgumentException- ifnis less than 3
-
-
Method Detail
-
getHorzCount
public int getHorzCount()
- Specified by:
getHorzCountin interfaceMeshMaker- Returns:
- the number of lines of latitude that the
Modelcontains
-
getVertCount
public int getVertCount()
- Specified by:
getVertCountin interfaceMeshMaker- Returns:
- the number of lines of longitude that the
Modelcontains
-
-