Skip to content

Commit

Permalink
2.105.8
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Jan 11, 2024
1 parent 41f1a01 commit 7aadd27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.marginallyclever</groupId>
<artifactId>RobotOverlord</artifactId>
<version>2.105.7</version>
<version>2.105.8</version>
<name>Robot Overlord</name>
<description>A friendly 3D user interface for controlling robots.</description>
<url>https://www.marginallyclever.com/</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public RotateToolOneAxis(ColorRGB color) {
this.color = color;
buildMarkerMesh();
buildAngleMesh();
ringMesh.setRenderStyle(GL3.GL_LINE_LOOP);
}

private void buildAngleMesh() {
Expand Down Expand Up @@ -389,8 +390,11 @@ private void drawWhileDragging(GL3 gl,ShaderProgram shaderProgram) {

private void drawMainRingAndHandles(GL3 gl,ShaderProgram shaderProgram) {
Matrix4d m = new Matrix4d(pivotMatrix);
m.transpose();
shaderProgram.setMatrix4d(gl,"modelMatrix",m);

Matrix4d scale = MatrixHelper.createScaleMatrix4(getRingRadiusScaled());
scale.mul(m,scale);
scale.transpose();
shaderProgram.setMatrix4d(gl,"modelMatrix",scale);

float colorScale = cursorOverHandle ? 1:0.5f;
float red = color.red * colorScale / 255f;
Expand All @@ -399,6 +403,9 @@ private void drawMainRingAndHandles(GL3 gl,ShaderProgram shaderProgram) {
shaderProgram.set4f(gl, "objectColor", red, green, blue, 1.0f);
ringMesh.render(gl,1,360);

m.transpose();
shaderProgram.setMatrix4d(gl,"modelMatrix",m);

Matrix4d m2 = MatrixHelper.createScaleMatrix4(getGripRadiusScaled());
m2.m03 = getHandleLengthScaled();
m2.m13 = getHandleOffsetYScaled();
Expand Down

0 comments on commit 7aadd27

Please sign in to comment.