Thursday, May 14, 2015

Some Qt tickles for UNISA COS2614

Qt software
Some simple things to remember for the UNISA COS2614 exam, in no particular order:

Download Qt here: https://www.qt.io/download/

Nice simple Qt examples here: http://zetcode.com/gui/qt4/


C++ if-else shorthand (ternary operators): 
condition ? value_if_true : value_if_false

Command Line Arguments: 
int main ( int argc, char *argv[] )
The integer, argc is the ARGument Count (hence argc). It is the number of arguments passed into the program from the command line, including the name of the program.

The array of character pointers is the listing of all the arguments. argv[0] is the name of the program, or an empty string if the name is not available. After that, every element number less than argc is a command line argument. You can use each argv element just like a string, or use argv as a two dimensional array. argv[argc] is a null pointer.

Explain two benefits of applying design patterns in OOP:
Improves re-usability and extensibility of software.
  • Re-usability - want to be able to re-use relevant bits of code in the simplest way possible. Design patterns attempt to express similar code in an abstract way, this allows for code reuse. We are able to design abstract classes in a way that allows us to derive from these classes and use similar code, this promotes code reusability.
  • Extensibility - how easy is it to add enhancements to an app. Design patterns also promote extensibility. A measure of how easy it is to add improvements to an application and one way of making code extensibility is to provide classes which can easily be sub-classed. Qt framework is a good example of this.

explicit:
The keyword explicit can be placed before a single argument constructor in the class
definition to prevent automatic conversion from being used by the compiler. This is useful if the argument is not anything like the class it is constructing, or if there is something akin to a parent-child relationship between them.
Classes generated by QtCreator place this keyword before the generated custom widget constructors, and it is advisable that you do the same with your QWidget -derived classes.
(The keyword explicit prevents the compiler from automatically using that constructor for implicit type conversions.)

Stack and Heap stuff:
When QObjects are created with new, they are created on the heap.
Otherwise they are created on the stack.

Polymorphic Assignment:
Polymorphic assignment allows a pointer of type superclass to point to objects of its concrete subclasses.

QMessageBox: 
QMessageBox::information (0, "String Reverse", reversed);

Very Simple Random number generator:
#include
#include

int main()
{
QTextStream cout(stdout);

qsrand(QTime::currentTime().msec());
int random = qrand() % 5;
cout << "Random number: " << random << endl;

return 0;
}

Very simple SIGNALS and SLOTS example:
//include necessary pre-processor directives here

int main(int argc, char *argv[]){
QApplication a(argc, argv);
QWidget w;
QLabel *label = new QLabel("Enter Text:");
QLineEdit *input = new QLineEdit("Hello");
QPushButton *clear = new QPushButton("Clear");
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(label);
layout->addWidget(input);
layout->addWidget(clear);
w.setLayout(layout);
QObject::connect(clear, SIGNAL(clicked()), input, SLOT(clear()));
w.show();
return a.exec();
}

What is the difference between a function declaration and a function
definition?
A function declaration describes how a function can be called.
A function definition includes the actual code that is to be executed.


Sunday, November 23, 2014

Free 3D coffee grinder

Grab this cool model for free over at turbosquid

  • Made by Turbosquid user PlastyForma
  • Created in 3ds Max 8, has V-Ray materials

 

Thursday, August 7, 2014

Free Terminator 3D models

Great T-800 Bust model available from TurboSquid member MarcuSCatu89 available here

Full terminator model by TurboSquid member mmarti available here



Saturday, July 26, 2014

Vray 3.0 for 3DS Max full pricelist

V-Ray 3.0 now supports 3ds Max 2015. This is how much it will cost you:










Free vuvuzela model

Thursday, December 31, 2009

V-Ray for 3ds Max - 1.5 SP4a official released

V-Ray/Max - 1.5 SP4a official is released, get it here

Modified features:
(*) Added support for projection mapping when doing texture baking;
(*) Added an option to link the V-Ray VFB to PDPlayer;

Bug fixes:
(*) Fixed some licensing issues;
(*) Turning off "Affect specular" for a dome light made it invisible to reflections as well;
(*) Fixed a crash when importing a particular .vrmesh file;
(*) Fixed crash with VRayFastSSS2 material with VRayDirt map and a standard light with VRayShadowMap;
(*) The "prepass samples" option in the motion blur rollout did not work;
(*) Fixed stuck buckets with VRayEnvironmentFog and mesh gizmos;
(*) Fixed issues with VRayEnvironmentFog and mesh gizmos with modifiers;
(*) User could not remove gizmos/lights from VRayEnvironmentFog;
(*) ParticleFlow instancing did not render all mapping channels of original mesh;
(*) Fixed crash with VFB region render when region is outside of image;
(*) Turned off by default the option to save the DR servers to the scene (caused slowdown on scene save if servers are offline);

Thursday, October 29, 2009

V-Ray 1.5 Service Pack 4 available for download









It's a free upgrade to all current V-Ray customers - get it here: http://www.chaosgroup.com/en/2/downloads.html

From the Chaosgroup site:

Modified features:
  • Improved multithreading on multi-core machines;
  • Ability to specify gizmo falloff for VRayEnvironmentFog;
  • Ability to use arbitrary meshes as gizmos for VRayEnvironmentFog;
  • Option to exclude the background from VRayEnvironmentFog;
  • Added CIE sky models to the VRaySun and VRaySky;
  • It is now possible to submit DR servers list for DR through backburner;
  • Added option to not use area speculars in the VRayIES light;
  • Added Kelvin temperature settings for the color of VRayLights;
  • VFB history is now turned off when 3ds Max is in slave mode;
  • Output .vrimg and split channel paths are listed in the Asset Tracker;
  • GI cache files (irradiance maps, light cache etc) are listed in the Asset Tracker.


Bug fixes:
  • DR fails with large .max files;
  • Crash with Remove button for gizmos and lights in VRayEnvironmentFog;
  • Crash with Hair&Fur in 3ds Max Design 2010;
  • Issue with Arch&Design materials in multi/sub-object material;
  • It should not be possible to export already created VRayProxy objects as .vrmesh files;
  •  Fixed invalid colors with texture-mapped lights when the texture contains black areas;
  •  Fixed occasional license errors with codes (-209), (-9) and (1000) on slow networks
  •  Fixed a crash when using a combination of VRayLightMtl materials and VrayDirt with "Work with  transparency" enabled;
  • Cloning the V-Ray renderer did not clone the override material exclusion list;
  • Fixed problems with velocity channel and objects close to the camera;
  • VRayToon was black on directly visible dome lights;
  • Fixed issue with VRayToon and opacity mapped objects;
  • Fixed a problem with hilights in VRayFastSSS2 material;
  • Fixed different buckets with interpolated glossy reflections and DR;
  • Multi-matte render element did not work with VRaySphereFade;
  • Fixed crash with DR in specific cases;
  • The MaxScript for exporting .vrscene files now exports "RGB Multiply", "RGB Tint", "ColorCorrect"  and  "ColorCorrection" textures;
New Feature:
  • An added new feature in V-Ray 1.50 SP4 is V-Ray Ambient Light.
Compatibility:
  • Works with Autodesk® 3ds Max® 8, Autodesk® 3ds Max® 9, Autodesk® 3ds Max® 2008, 3ds Max® 2009, Autodesk® 3ds Max Design 2009, Autodesk® 3ds Max® 2010, Autodesk® 3ds Max® Design 2010.
  • 32 Bit and 64 Bit versions are available

 
VRay-SP4 CIE Clear sky model test from Chris Jackson on Vimeo.

3D models

More random 3d stuff I've made and rendered

Loading...