Class RinearnGraph3DRenderer
java.lang.Object
com.rinearn.graph3d.renderer.RinearnGraph3DRenderer
リニアングラフ3D(RINEARN Graph 3D)の3D描画エンジンを, Java言語のコードから直接制御するためのAPIクラスです
The API class for controlling the 3D rendering engine (renderer) of RINEARN Graph 3D
.
-
Constructor Summary
ConstructorsConstructorDescriptionこのコンストラクタは, 通常利用においては使用できません(このコンストラクタでは, 描画エンジンの実装に未接続のインスタンスが生成されます) Can not use this constructor in normal usage (because the created instance is not linked to the renderer implementation) . -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
現在のグラフ画面における描画内容を全て消去します Clears all currently rendered contents of the graph .void
グラフのフレーム(外枠)を描画します Draws the box frame of the graph .void
drawGrid()
グラフのグリッド線を描画します Draws the grid lines of the graph .void
グラフの座標軸ラベルを描画します Draws the labels of the axes of the graph .void
drawLine
(double aX, double aY, double aZ, double bX, double bY, double bZ, double width) 直線を描画します Draws a line .void
drawLine
(double aX, double aY, double aZ, double bX, double bY, double bZ, double width, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 直線を描画します Draws a line with the specified parameter settings .void
drawLine
(double aX, double aY, double aZ, double bX, double bY, double bZ, double width, Color color) 指定された色の直線を描画します Draws a line of the specified color .void
drawPoint
(double x, double y, double z, double radius) 点を描画します Draws a point .void
drawPoint
(double x, double y, double z, double radius, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 点を描画します Draws a point with the specified parameter settings .void
指定された色で, 点を描画します Draws a point of the specified color .void
drawQuadrangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ) 四角形ポリゴンを描画します Draws a quadrangle polygon .void
drawQuadrangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 四角形ポリゴンを描画します Draws a quadrangle polygon with the specified parameter settings .void
drawQuadrangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, Color color) 指定された色の四角形ポリゴンを描画します Draws a quadrangle polygon of the specified color .void
グラフの目盛りを描画します Draws the scale (ticks) of the graph .void
drawText
(double x, double y, double z, String text, Font font, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 3D空間中に文字列を描画します Draws a text string in the 3D space, with the specified parameter settings .void
指定された色で, 3D空間中に文字列を描画します Draws a text string in the 3D space, with the specified color .void
drawTriangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ) 三角形ポリゴンを描画します Draws a triangle polygon .void
drawTriangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 三角形ポリゴンを描画します Draws a triangle polygon with the specified parameter settings .void
drawTriangle
(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, Color color) 指定された色の三角形ポリゴンを描画します Draws a triangle polygon of the specified color .void
render()
グラフ画面を描画します Renders the graph screen .
-
Constructor Details
-
RinearnGraph3DRenderer
public RinearnGraph3DRenderer()このコンストラクタは, 通常利用においては使用できません(このコンストラクタでは, 描画エンジンの実装に未接続のインスタンスが生成されます) Can not use this constructor in normal usage (because the created instance is not linked to the renderer implementation) .通常利用において, このクラスのインスタンスを得るには,RinearnGraph3D
インスタンスのgetRenderer
メソッドを使用してください.For getting an instance of this class in normal usage, usegetRenderer
method of aRinearnGraph3D
insetance.
-
-
Method Details
-
clear
public void clear()現在のグラフ画面における描画内容を全て消去します Clears all currently rendered contents of the graph .RinearnGraph3D.clear
とは異なり, 座標軸や目盛りなども消去され, 画面上に何も無い状態となります. それらを残したい場合は, 代わりにRinearnGraph3D.clear
を使用してください.Different fromRinearnGraph3D.clear
method, this method clears not only plotted data but also axes and scales (so this method clears everything on the graph). If you want to clear only plotted data, useRinearnGraph3D.clear
method instead. -
render
public void render()グラフ画面を描画します Renders the graph screen .通常は, このメソッドをコールするまでグラフ画面は更新されません. そのため,drawPoint
やdrawLine
等で立体の描画を行った後, 最後にこのメソッドをコールしてください. ただし, マウス等で視点が操作された際など, 自動で再描画が行われる事もあります.Basically, the renderer does not update the graph image until this method is called. Hence, after using the drawing methods such asdrawPoint
anddrawLine
, please call this method for rendering the drawn objects to the graph. Note that, there are some certain timings that the graph image is updated automatically, e.g.: when the camera angle has changed by user's mouse dragging. -
drawPoint
public void drawPoint(double x, double y, double z, double radius) 点を描画します Draws a point .- Parameters:
x
- 点のX座標 The X coordinate of the pointy
- 点のY座標 The Y coordinate of the pointz
- 点のZ座標 The Z coordinate of the pointradius
- 点の半径(ピクセル単位) The radius of the point (in pixels)
-
drawPoint
指定された色で, 点を描画します Draws a point of the specified color .- Parameters:
x
- 点のX座標 The X coordinate of the pointy
- 点のY座標 The Y coordinate of the pointz
- 点のZ座標 The Z coordinate of the pointradius
- 点の半径(ピクセル単位) The radius of the point (in pixels)color
- 点の色 The color of the point
-
drawPoint
public void drawPoint(double x, double y, double z, double radius, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 点を描画します Draws a point with the specified parameter settings .- Parameters:
x
- 点のX座標 The X coordinate of the pointy
- 点のY座標 The Y coordinate of the pointz
- 点のZ座標 The Z coordinate of the pointradius
- 点の半径(ピクセル単位) The radius of the point (in pixels)parameter
- 描画パラメーターを格納しているオブジェクト The object storing the drawing parameters
-
drawLine
public void drawLine(double aX, double aY, double aZ, double bX, double bY, double bZ, double width) 直線を描画します Draws a line .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point Bwidth
- 直線の太さ(ピクセル単位) The width of the line (in pixels)
-
drawLine
public void drawLine(double aX, double aY, double aZ, double bX, double bY, double bZ, double width, Color color) 指定された色の直線を描画します Draws a line of the specified color .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point Bwidth
- 直線の太さ(ピクセル単位) The width of the line (in pixels)color
- 直線の色 The color of the line
-
drawLine
public void drawLine(double aX, double aY, double aZ, double bX, double bY, double bZ, double width, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 直線を描画します Draws a line with the specified parameter settings .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point Bwidth
- 直線の太さ(ピクセル単位) The width of the line (in pixels)parameter
- 描画パラメーターを格納しているオブジェクト The object storing the drawing parameters
-
drawTriangle
public void drawTriangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ) 三角形ポリゴンを描画します Draws a triangle polygon .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point C
-
drawTriangle
public void drawTriangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, Color color) 指定された色の三角形ポリゴンを描画します Draws a triangle polygon of the specified color .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point Ccolor
- 三角形ポリゴンの色 The color of the triangle polygon
-
drawTriangle
public void drawTriangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 三角形ポリゴンを描画します Draws a triangle polygon with the specified parameter settings .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point Cparameter
- 描画パラメーターを格納しているオブジェクト The object storing the drawing parameters
-
drawQuadrangle
public void drawQuadrangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ) 四角形ポリゴンを描画します Draws a quadrangle polygon .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point CdX
- 点DのX座標 The X coordinate of the point DdY
- 点DのY座標 The Y coordinate of the point DdZ
- 点DのZ座標 The Z coordinate of the point D
-
drawQuadrangle
public void drawQuadrangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, Color color) 指定された色の四角形ポリゴンを描画します Draws a quadrangle polygon of the specified color .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point CdX
- 点DのX座標 The X coordinate of the point DdY
- 点DのY座標 The Y coordinate of the point DdZ
- 点DのZ座標 The Z coordinate of the point Dcolor
- 四角形ポリゴンの色 The color of the quadrangle polygon
-
drawQuadrangle
public void drawQuadrangle(double aX, double aY, double aZ, double bX, double bY, double bZ, double cX, double cY, double cZ, double dX, double dY, double dZ, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 四角形ポリゴンを描画します Draws a quadrangle polygon with the specified parameter settings .- Parameters:
aX
- 点AのX座標 The X coordinate of the point AaY
- 点AのY座標 The Y coordinate of the point AaZ
- 点AのZ座標 The Z coordinate of the point AbX
- 点BのX座標 The X coordinate of the point BbY
- 点BのY座標 The Y coordinate of the point BbZ
- 点BのZ座標 The Z coordinate of the point BcX
- 点CのX座標 The X coordinate of the point CcY
- 点CのY座標 The Y coordinate of the point CcZ
- 点CのZ座標 The Z coordinate of the point CdX
- 点DのX座標 The X coordinate of the point DdY
- 点DのY座標 The Y coordinate of the point DdZ
- 点DのZ座標 The Z coordinate of the point Dparameter
- 描画パラメーターを格納しているオブジェクト The object storing the drawing parameters
-
drawText
指定された色で, 3D空間中に文字列を描画します Draws a text string in the 3D space, with the specified color .- Parameters:
x
- ベースライン左端のX座標 The X coordinate of the left edge of the base liney
- ベースライン左端のY座標 The Y coordinate of the left edge of the base linez
- ベースライン左端のZ座標 The Z coordinate of the left edge of the base linetext
- 文字列の内容 The content of the textfont
- 文字列のフォント The font of the textcolor
- 文字列の描画色 The color of the text
-
drawText
public void drawText(double x, double y, double z, String text, Font font, RinearnGraph3DDrawingParameter parameter) 詳細な設定に基づいて, 3D空間中に文字列を描画します Draws a text string in the 3D space, with the specified parameter settings .- Parameters:
x
- ベースライン左端のX座標 The X coordinate of the left edge of the base liney
- ベースライン左端のY座標 The Y coordinate of the left edge of the base linez
- ベースライン左端のZ座標 The Z coordinate of the left edge of the base linetext
- 文字列の内容 The content of the textfont
- 文字列のフォント The font of the textparameter
- 描画パラメーターを格納しているオブジェクト The object storing the drawing parameters
-
drawFrame
public void drawFrame()グラフのフレーム(外枠)を描画します Draws the box frame of the graph . -
drawScale
public void drawScale()グラフの目盛りを描画します Draws the scale (ticks) of the graph . -
drawGrid
public void drawGrid()グラフのグリッド線を描画します Draws the grid lines of the graph . -
drawLabel
public void drawLabel()グラフの座標軸ラベルを描画します Draws the labels of the axes of the graph .
-