protected override bool ShouldGenerateNewMesh(BaseShape.Model newModel) { if (currentMesh == null) { return(true); } Model newPlaneModel = newModel as Model; if (newPlaneModel.uvs != null && model.uvs != null) { if (newPlaneModel.uvs.Length != model.uvs.Length) { return(true); } for (int i = 0; i < newPlaneModel.uvs.Length; i++) { if (newPlaneModel.uvs[i] != model.uvs[i]) { return(true); } } } else { if (newPlaneModel.uvs != model.uvs) { return(true); } } return(newPlaneModel.width != model.width || newPlaneModel.height != model.height); }
protected override bool ShouldGenerateNewMesh(BaseShape.Model previousModel) { if (currentMesh == null) { return(true); } BoxShape.Model newBoxModel = (BoxShape.Model) this.model; BoxShape.Model oldBoxModel = (BoxShape.Model)previousModel; if (newBoxModel.uvs != null && oldBoxModel.uvs != null) { if (newBoxModel.uvs.Length != oldBoxModel.uvs.Length) { return(true); } for (int i = 0; i < newBoxModel.uvs.Length; i++) { if (newBoxModel.uvs[i] != oldBoxModel.uvs[i]) { return(true); } } } else { if (newBoxModel.uvs != oldBoxModel.uvs) { return(true); } } return(false); }
protected override bool ShouldGenerateNewMesh(BaseShape.Model newModel) { if (currentMesh == null) { return(true); } Model newCylinderModel = newModel as Model; return(newCylinderModel.radius != model.radius || newCylinderModel.radiusTop != model.radiusTop || newCylinderModel.radiusBottom != model.radiusBottom || newCylinderModel.segmentsHeight != model.segmentsHeight || newCylinderModel.segmentsRadial != model.segmentsRadial || newCylinderModel.openEnded != model.openEnded || newCylinderModel.arc != model.arc); }
protected override bool ShouldGenerateNewMesh(BaseShape.Model newModel) { return(currentMesh == null); }
protected virtual bool ShouldGenerateNewMesh(BaseShape.Model newModel) { return(true); }