Sunday, May 29, 2016
Blender => OpenGL ES
Blender tutorials
https://www.raywenderlich.com/49955/blender-tutorial-for-beginners-how-to-make-a-mushroom
http://cgcookie.com/blender/cgc-courses/blender-basics-introduction-for-beginners/
http://www.blender.org/education-help/tutorials/
http://blendtuts.com/blender_tutorials?field_level_value=Beginner
OpenGL ES
https://www.raywenderlich.com/?p=5223
https://www.raywenderlich.com/3664/opengl-tutorial-for-ios-opengl-es-2-0
Blender to OpenGL ES
https://www.raywenderlich.com/48293/how-to-export-blender-models-to-opengl-es-part-1
https://www.raywenderlich.com/48297/export-blender-models-opengl-es-part-2
https://www.raywenderlich.com/48299/export-blender-models-opengl-es-part-3
https://www.raywenderlich.com/49955/blender-tutorial-for-beginners-how-to-make-a-mushroom
http://cgcookie.com/blender/cgc-courses/blender-basics-introduction-for-beginners/
http://www.blender.org/education-help/tutorials/
http://blendtuts.com/blender_tutorials?field_level_value=Beginner
OpenGL ES
https://www.raywenderlich.com/?p=5223
https://www.raywenderlich.com/3664/opengl-tutorial-for-ios-opengl-es-2-0
Blender to OpenGL ES
https://www.raywenderlich.com/48293/how-to-export-blender-models-to-opengl-es-part-1
https://www.raywenderlich.com/48297/export-blender-models-opengl-es-part-2
https://www.raywenderlich.com/48299/export-blender-models-opengl-es-part-3
Thursday, May 19, 2016
2D Shape Recognition
http://stackoverflow.com/questions/25148136/2d-shape-recognition-algorithm-looking-for-guidance
http://www.tina-vision.net/docs/memos/1996-003.pdf
http://graphics.stanford.edu/courses/cs468-08-fall/pdf/belongie-pami02.pdf
https://www.robots.ox.ac.uk/~vgg/publications/2003/Mikolajczyk03a/mikolajczyk03a.pdf
http://www.ece.ncsu.edu/imaging/Publications/2007/ShapePaper.pdf
http://ijcsi.org/papers/IJCSI-10-6-1-162-166.pdf
simple shape recognition algorithms performance
http://www.tina-vision.net/docs/memos/1996-003.pdf
http://graphics.stanford.edu/courses/cs468-08-fall/pdf/belongie-pami02.pdf
https://www.robots.ox.ac.uk/~vgg/publications/2003/Mikolajczyk03a/mikolajczyk03a.pdf
http://www.ece.ncsu.edu/imaging/Publications/2007/ShapePaper.pdf
http://ijcsi.org/papers/IJCSI-10-6-1-162-166.pdf
simple shape recognition algorithms performance
Wednesday, May 18, 2016
iOS graphics
http://www.sunsetlakesoftware.com/
https://github.com/BradLarson/GPUImage
https://github.com/BradLarson/GPUImage2
http://code.tutsplus.com/tutorials/build-a-photo-app-with-gpuimage--mobile-12223
https://www.youtube.com/watch?v=6J_0PrmdD38
https://www.raywenderlich.com/77488/ios-8-metal-tutorial-swift-getting-started
https://github.com/BradLarson/GPUImage
https://github.com/BradLarson/GPUImage2
http://code.tutsplus.com/tutorials/build-a-photo-app-with-gpuimage--mobile-12223
https://www.youtube.com/watch?v=6J_0PrmdD38
https://www.raywenderlich.com/77488/ios-8-metal-tutorial-swift-getting-started
Saturday, May 14, 2016
CALayer
https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CALayer_class/
alpha:
Simply change opacity directly. The range is within [0.0f, 1.0f]
http://stackoverflow.com/questions/15865500/calayer-sublayer-alpha-overriding
http://stackoverflow.com/questions/12448847/calayer-opacity-animation
rounded corner:
Can be changed on the fly through "setCornerRadiu"
http://stackoverflow.com/questions/4754392/uiview-with-rounded-corners-and-drop-shadow
frame:
Can be changed on the fly by writing to frame directly
contentsGravity vs contentsScale vs transform/affineTransform
contentsScale: 1 => 1 pixel per point, n=> n pixels per point
- when kCAGravityResizeAspect / kCAGravityCenter
If out of bound, masksToBounds property is useful.
contentsRect: 0-1.0. unit coordinates.
- sprite sheets:
contentsCenter: area can be stretched.
alpha:
Simply change opacity directly. The range is within [0.0f, 1.0f]
http://stackoverflow.com/questions/15865500/calayer-sublayer-alpha-overriding
http://stackoverflow.com/questions/12448847/calayer-opacity-animation
rounded corner:
Can be changed on the fly through "setCornerRadiu"
http://stackoverflow.com/questions/4754392/uiview-with-rounded-corners-and-drop-shadow
frame:
Can be changed on the fly by writing to frame directly
contentsGravity vs contentsScale vs transform/affineTransform
contentsScale: 1 => 1 pixel per point, n=> n pixels per point
- when kCAGravityResizeAspect / kCAGravityCenter
If out of bound, masksToBounds property is useful.
contentsRect: 0-1.0. unit coordinates.
- sprite sheets:
contentsCenter: area can be stretched.
Wednesday, May 11, 2016
Ultra low power microcontroller
ATtiny43U
AVR652: http://www.atmel.com/Images/doc8249.pdf
ATtinyX3U + STK600:
http://www.atmel.com/devices/ATTINY43U.aspx?tab=tools
http://www.instructables.com/id/How-to-make-a-cheap-Attiny-Arduino-Board/?ALLSTEPS
https://hackaday.io/
https://hackaday.io/projects/tag/2015HackadayPrize
AVR652: http://www.atmel.com/Images/doc8249.pdf
ATtinyX3U + STK600:
http://www.atmel.com/devices/ATTINY43U.aspx?tab=tools
http://www.instructables.com/id/How-to-make-a-cheap-Attiny-Arduino-Board/?ALLSTEPS
https://hackaday.io/
https://hackaday.io/projects/tag/2015HackadayPrize
Wednesday, April 27, 2016
C++ template and singleton
It is just annoying to see tons of singletons with their member variable _instance and their get member function manually typed.
Here is what I did.
So far, a singleton depends on its own class <T> and a response message <X>. For messages without sophisticated structure, DummyResponseBody can be used as <X>.
1. The singleton header.
2. derived class header
3. derived class cpp
Here is what I did.
So far, a singleton depends on its own class <T> and a response message <X>. For messages without sophisticated structure, DummyResponseBody can be used as <X>.
1. The singleton header.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
/*
* ControlReqSingleton.h
*
* Created on: Apr 26, 2016
* Author: Technoboundary
*/
#ifndef CONTROLREQSINGLETON_H_
#define CONTROLREQSINGLETON_H_
#include "ControlReq.h"
//Lang: For many ASN.1 request, the response does not have a body.
// In order to use this framework, a dummy response body structure is used.
struct DummyResponseBody
{
uint32_t dummy;
};
template <typename ...> class ControlReqSingleton;
template <class T, typename X>
class ControlReqSingleton<T, X> : public ControlReq {
public:
ControlReqSingleton() {};
virtual ~ControlReqSingleton() {};
//ToDo: should be reference instead of pointer.
static T* getControlReq()
{
if (NULL == _instance)
{
_instance = new T();
}
return _instance;
}
virtual void reInitialize()
{
ControlReq::reInitialize();
}
virtual void handleReq(ICD_ControlRequest* pMsg, eIntfcId intfcId_) = 0;
virtual uint32_t getMessageTag() = 0;
virtual X* fillResponseBody() = 0;
virtual void genResp()
{
// put inquiry in control response body
ControlReq::pControlResponse->body.t = getMessageTag();
// u is a union.
ControlReq::pControlResponse->body.u.inquiry = (InquiryResponseBody*) fillResponseBody();
// add common response
ControlReq::addCommonResp();
}
private:
static T* _instance;
};
//initiate singleton instance here
template <class T, typename X>
T* ControlReqSingleton<T, X>::_instance = NULL;
#endif /* CONTROLREQSINGLETON_H_ */
2. derived class header
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*
* AntennaRangeInquiry.h
*
* Created on: Apr 26, 2016
* Author: Technoboundary
*/
#ifndef ANTENNARANGEINQUIRY_H_
#define ANTENNARANGEINQUIRY_H_
#include "ControlReqSingleton.h"
class AntennaRangeInquiry;
class AntennaRangeInquiry: public ControlReqSingleton<AntennaRangeInquiry, AntennaRangeInquiryResponse>{
public:
AntennaRangeInquiry();
virtual ~AntennaRangeInquiry();
virtual void handleReq(ICD_ControlRequest* pMsg, eIntfcId intfcId_);
virtual uint32_t getMessageTag();
virtual AntennaRangeInquiryResponse* fillResponseBody();
void fillAntennaRange();
};
#endif /* ANTENNARANGEINQUIRY_H_ */
3. derived class cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
/*
* AntennaRangeInquiry.cpp
*
* Created on: Apr 26, 2016
* Author: Technoboundary
*/
#include "AntennaRangeInquiry.h"
AntennaRangeInquiry::AntennaRangeInquiry() {
// TODO Auto-generated constructor stub
}
AntennaRangeInquiry::~AntennaRangeInquiry() {
// TODO Auto-generated destructor stub
}
void AntennaRangeInquiry::handleReq(ICD_ControlRequest* pMsg, eIntfcId intfcId_)
{
//reInitialize();
//bind(pMsg);
//status = checkAndParseMsgBody();
}
uint32_t AntennaRangeInquiry::getMessageTag()
{
return T_ControlResponseBody_antennaRangeInquiry;
}
AntennaRangeInquiryResponse* AntennaRangeInquiry::fillResponseBody()
{
// First allocate memory for Inquiry and initialize it
AntennaRangeInquiryResponse* pResp = rtxMemAllocType(pWCtxt, AntennaRangeInquiryResponse); //Lang: this is globally available. do not know who will free yet.
InitIncExtElem1(AntennaRangeInquiryResponse, pResp);
return pResp;
}
void AntennaRangeInquiry::fillAntennaRange()
{
}
Subscribe to:
Posts (Atom)