Java Code Examples for processing.core.PShape#setNormal()

The following examples show how to use processing.core.PShape#setNormal() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Skylight_BulletPhysics_Cubes.java    From PixelFlow with MIT License 5 votes vote down vote up
private void fixBoxNormals(PShape box){
  PShape face;
  face = box.getChild(1);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, -1, 0, 0);
  }
  face = box.getChild(3);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, +1, 0, 0);
  }
}
 
Example 2
Source File: Skylight_BulletPhysics_CellFracture.java    From PixelFlow with MIT License 5 votes vote down vote up
private void fixBoxNormals(PShape box){
  PShape face;
  face = box.getChild(1);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, -1, 0, 0);
  }
  face = box.getChild(3);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, +1, 0, 0);
  }
}
 
Example 3
Source File: Skylight_BulletPhysics_MengerSponge.java    From PixelFlow with MIT License 5 votes vote down vote up
private void fixBoxNormals(PShape box){
  PShape face;
  face = box.getChild(1);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, -1, 0, 0);
  }
  face = box.getChild(3);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, +1, 0, 0);
  }
}
 
Example 4
Source File: Skylight_BulletPhysics_TowerDemolition.java    From PixelFlow with MIT License 5 votes vote down vote up
private void fixBoxNormals(PShape box){
  PShape face;
  face = box.getChild(1);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, -1, 0, 0);
  }
  face = box.getChild(3);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, +1, 0, 0);
  }
}
 
Example 5
Source File: Skylight_BulletPhysics_Basic.java    From PixelFlow with MIT License 5 votes vote down vote up
private void fixBoxNormals(PShape box){
  PShape face;
  face = box.getChild(1);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, -1, 0, 0);
  }
  face = box.getChild(3);
  for(int i = 0; i < 4; i++){
    face.setNormal(i, +1, 0, 0);
  }
}